changeset 2286:01f05e74aa9c

Big PEP8 and whitespace cleanup
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 02 Jul 2007 23:33:20 +0200
parents 751e149a9a0a
children 0005f996ff92
files MoinMoin/Page.py MoinMoin/PageEditor.py MoinMoin/PageGraphicalEditor.py MoinMoin/__init__.py MoinMoin/_template.py MoinMoin/_tests/_test_template.py MoinMoin/_tests/compat.py MoinMoin/_tests/test_PageEditor.py MoinMoin/_tests/test_sourcecode.py MoinMoin/_tests/test_user.py MoinMoin/_tests/test_wikidicts.py MoinMoin/_tests/test_wikisync.py MoinMoin/action/AttachFile.py MoinMoin/action/CopyPage.py MoinMoin/action/DeletePage.py MoinMoin/action/Despam.py MoinMoin/action/LikePages.py MoinMoin/action/Load.py MoinMoin/action/LocalSiteMap.py MoinMoin/action/PackagePages.py MoinMoin/action/RenamePage.py MoinMoin/action/Save.py MoinMoin/action/SpellCheck.py MoinMoin/action/__init__.py MoinMoin/action/backup.py MoinMoin/action/diff.py MoinMoin/action/fckdialog.py MoinMoin/action/fullsearch.py MoinMoin/action/info.py MoinMoin/action/pollsistersites.py MoinMoin/action/revert.py MoinMoin/action/rss_rc.py MoinMoin/action/sisterpages.py MoinMoin/action/supplementation.py MoinMoin/action/titleindex.py MoinMoin/action/userprefs.py MoinMoin/auth/_PHPsessionParser.py MoinMoin/auth/__init__.py MoinMoin/auth/http.py MoinMoin/auth/ldap_login.py MoinMoin/auth/mysql_group.py MoinMoin/auth/php_session.py MoinMoin/auth/sslclientcert.py MoinMoin/config/multiconfig.py MoinMoin/conftest.py MoinMoin/converter/_tests/test_text_html_text_moin_wiki.py MoinMoin/converter/text_html_text_moin_wiki.py MoinMoin/error.py MoinMoin/events/__init__.py MoinMoin/events/emailnotify.py MoinMoin/events/jabbernotify.py MoinMoin/events/messages.py MoinMoin/events/wikidictsrescan.py MoinMoin/failure.py MoinMoin/filter/EXIF.py MoinMoin/filter/application_msword.py MoinMoin/filter/application_octet_stream.py MoinMoin/filter/application_pdf.py MoinMoin/filter/application_vnd_ms_excel.py MoinMoin/filter/audio.py MoinMoin/filter/image.py MoinMoin/filter/text_rtf.py MoinMoin/filter/video.py MoinMoin/formatter/__init__.py MoinMoin/formatter/text_docbook.py MoinMoin/formatter/text_html.py MoinMoin/formatter/text_plain.py MoinMoin/formatter/text_xml.py MoinMoin/i18n/__init__.py MoinMoin/i18n/dummy.py MoinMoin/i18n/msgfmt.py MoinMoin/i18n/tools/check_i18n.py MoinMoin/i18n/tools/mail_i18n-maintainers.py MoinMoin/i18n/tools/recode.py MoinMoin/logfile/__init__.py MoinMoin/logfile/editlog.py MoinMoin/logfile/eventlog.py MoinMoin/macro/AdvancedSearch.py MoinMoin/macro/EditedSystemPages.py MoinMoin/macro/EmbedObject.py MoinMoin/macro/FootNote.py MoinMoin/macro/Hits.py MoinMoin/macro/ImageLink.py MoinMoin/macro/Include.py MoinMoin/macro/MonthCalendar.py MoinMoin/macro/Navigation.py MoinMoin/macro/NewPage.py MoinMoin/macro/RandomPage.py MoinMoin/macro/RandomQuote.py MoinMoin/macro/RecentChanges.py MoinMoin/macro/SystemInfo.py MoinMoin/macro/TableOfContents.py MoinMoin/macro/__init__.py MoinMoin/macro/_tests/test_ImageLink.py MoinMoin/mail/_tests/test_sendmail.py MoinMoin/mail/mailimport.py MoinMoin/mail/sendmail.py MoinMoin/packages.py MoinMoin/parser/_ParserBase.py MoinMoin/parser/_tests/test_text_moin_wiki.py MoinMoin/parser/text.py MoinMoin/parser/text_cplusplus.py MoinMoin/parser/text_csv.py MoinMoin/parser/text_docbook.py MoinMoin/parser/text_html.py MoinMoin/parser/text_irssi.py MoinMoin/parser/text_moin_wiki.py MoinMoin/parser/text_pascal.py MoinMoin/parser/text_python.py MoinMoin/parser/text_rst.py MoinMoin/parser/text_xslt.py MoinMoin/request/CLI.py MoinMoin/request/MODPYTHON.py MoinMoin/request/STANDALONE.py MoinMoin/request/TWISTED.py MoinMoin/request/__init__.py MoinMoin/request/_tests/test_request.py MoinMoin/script/__init__.py MoinMoin/script/account/check.py MoinMoin/script/export/dump.py MoinMoin/script/import/irclog.py MoinMoin/script/maint/cleancache.py MoinMoin/script/maint/cleanpage.py MoinMoin/script/maint/globaledit.py MoinMoin/script/maint/reducewiki.py MoinMoin/script/migration/data.py MoinMoin/script/migration/wikimarkup_converter.py MoinMoin/script/moin.py MoinMoin/script/old/migration/12_to_13_mig01.py MoinMoin/script/old/migration/12_to_13_mig02.py MoinMoin/script/old/migration/12_to_13_mig03.py MoinMoin/script/old/migration/12_to_13_mig04.py MoinMoin/script/old/migration/12_to_13_mig05.py MoinMoin/script/old/migration/12_to_13_mig06.py MoinMoin/script/old/migration/12_to_13_mig07.py MoinMoin/script/old/migration/12_to_13_mig08.py MoinMoin/script/old/migration/12_to_13_mig09.py MoinMoin/script/old/migration/12_to_13_mig10.py MoinMoin/script/old/migration/12_to_13_mig11.py MoinMoin/script/old/migration/152_to_1050300.py MoinMoin/script/old/print_stats.py MoinMoin/script/old/repair_language.py MoinMoin/script/old/xmlrpc-tools/UpdateGroupTest.py MoinMoin/script/old/xmlrpc-tools/get_es_pages.py MoinMoin/script/old/xmlrpc-tools/getmasterpages2.py MoinMoin/script/old/xmlrpc-tools/getsystempages2.py MoinMoin/script/old/xmlrpc-tools/wikibackup.py MoinMoin/script/old/xmlrpc-tools/wikirestore.py MoinMoin/script/xmlrpc/remote.py MoinMoin/search/Xapian.py MoinMoin/search/__init__.py MoinMoin/search/_tests/test_search.py MoinMoin/search/builtin.py MoinMoin/search/queryparser.py MoinMoin/search/results.py MoinMoin/security/__init__.py MoinMoin/security/_tests/test_security.py MoinMoin/security/autoadmin.py MoinMoin/server/CGI.py MoinMoin/server/STANDALONE.py MoinMoin/server/TWISTED.py MoinMoin/server/daemon.py MoinMoin/stats/chart.py MoinMoin/stats/hitcounts.py MoinMoin/stats/useragents.py MoinMoin/theme/__init__.py MoinMoin/theme/classic.py MoinMoin/theme/modern.py MoinMoin/theme/rightsidebar.py MoinMoin/user.py MoinMoin/userform.py MoinMoin/util/_tests/test_lock.py MoinMoin/util/_tests/test_pysupport.py MoinMoin/util/bdiff.py MoinMoin/util/chartypes_create.py MoinMoin/util/dataset.py MoinMoin/util/diff3.py MoinMoin/util/diff_html.py MoinMoin/util/diff_text.py MoinMoin/util/filesys.py MoinMoin/util/lock.py MoinMoin/util/profile.py MoinMoin/util/pysupport.py MoinMoin/util/rpc_aggregator.py MoinMoin/util/thread_monitor.py MoinMoin/util/web.py MoinMoin/widget/_tests/test_html.py MoinMoin/widget/dialog.py MoinMoin/wikidicts.py MoinMoin/wikiutil.py MoinMoin/wikixml/marshal.py MoinMoin/xmlrpc/__init__.py MoinMoin/xmlrpc/_tests/test_multicall.py MoinMoin/xmlrpc/putClientInfo.py contrib/auth_externalcookie/wikiconfig.py contrib/gettext_parser/gettext.py contrib/phpwiki_migration/phpwiki2moinmoin.py jabberbot/commands.py jabberbot/config.py jabberbot/main.py jabberbot/multicall.py jabberbot/xmlrpcbot.py jabberbot/xmppbot.py setup.py tests/wikiconfig.py wiki/config/mailimportconf.py wiki/config/more_samples/jabber_wikiconfig.py wiki/config/more_samples/ldap_smb_farmconfig.py wiki/config/wikiconfig.py wiki/config/wikifarm/farmconfig.py wiki/server/mointwisted.py wikiconfig.py
diffstat 212 files changed, 1724 insertions(+), 1714 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Page.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/Page.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,15 +1,15 @@
 # -*- coding: iso-8859-1 -*-
 """
     MoinMoin - Page class
-    
+
     Page is used for read-only access to a wiki page. For r/w access see PageEditor.
     A Page object is used to access a wiki page (in general) as well as to access
     some specific revision of a wiki page.
-    
+
     The RootPage is some virtual page located at / and is mainly used to do namespace
-    operations like getting the page list. 
+    operations like getting the page list.
 
-    Currently, this is all a big mixture between high-level page code, intermediate 
+    Currently, this is all a big mixture between high-level page code, intermediate
     data/underlay layering code, caching code and low-level filesystem storage code.
     To see the filesystem storage layout we use, best is to look into data/pages/
     (underlay dir uses the same format).
@@ -201,7 +201,7 @@
         self._pagepath = [normalpath, underlaypath]
 
     # now we define some properties to lazy load some attributes on first access:
-    
+
     def get_body(self):
         if self.__body is None:
             # try to open file
@@ -225,7 +225,7 @@
             finally:
                 f.close()
         return self.__body
-      
+
     def set_body(self, newbody):
         self.__body = newbody
         self.__meta = None
@@ -249,7 +249,7 @@
             self.__pi = self.parse_processing_instructions()
         return self.__pi
     pi = property(fget=get_pi) # processed meta stuff
-    
+
     def getlines(self):
         """ Return a list of all lines in body.
 
@@ -305,7 +305,7 @@
 
     def get_rev_dir(self, pagedir, rev=0):
         """ Get a revision of a page from an arbitrary pagedir.
-        
+
         Does not modify page object's state, uncached, direct disk access.
 
         @param pagedir: the path to the page storage area
@@ -330,21 +330,21 @@
 
     def _setRealPageName(self, pagedir):
         """ Set page_name to the real case of page name
-        
+
         On case insensitive file system, "pagename" exists even if the
         real page name is "PageName" or "PAGENAME". This leads to
         confusion in urls, links and logs.
         See MoinMoinBugs/MacHfsPlusCaseInsensitive
-        
+
         Correct the case of the page name. Elements created from the
         page name in reset() are not updated because it's too messy, and
         this fix seems to be enough for 1.3.
-        
+
         Problems to fix later:
-        
+
          - ["helponnavigation"] link to HelpOnNavigation but not
            considered as backlink.
-        
+
         @param pagedir: the storage path to the page directory
         """
         realPath = util.filesys.realPathCase(pagedir)
@@ -403,9 +403,9 @@
 
     def current_rev(self):
         """ Return number of current revision.
-        
+
         This is the same as get_rev()[1].
-        
+
         @return: int revision
         """
         pagefile, rev, exists = self.get_rev()
@@ -476,7 +476,7 @@
         isfile = kw.get('isfile', 0)
         use_underlay = kw.get('use_underlay', -1)
         underlay, path = self.getPageBasePath(use_underlay)
-        fullpath = os.path.join(*((path,) + args))
+        fullpath = os.path.join(*((path, ) + args))
         if check_create:
             if isfile:
                 dirname, filename = os.path.split(fullpath)
@@ -509,7 +509,7 @@
     # XXX TODO do not use mtime() calls any more
     def _last_edited(self, request):
         # as it is implemented now, this is rather a _last_changed as it just uses
-        # the last log entry, which could be not only from an edit, but also from 
+        # the last log entry, which could be not only from an edit, but also from
         # an attachment operation. See different semantics in .mtime().
         cache_name = self.page_name
         cache_key = 'lastlog'
@@ -940,7 +940,7 @@
                         else:
                             url = Page(request, target).url(request)
                         pi['refresh'] = (delay, url)
-                    except (ValueError,):
+                    except (ValueError, ):
                         pass
 
             elif verb == "redirect":
@@ -964,7 +964,7 @@
         """ Output the raw page data (action=raw).
             With no content_disposition, the browser usually just displays the
             data on the screen, with content_disposition='attachment', it will
-            offer a dialogue to save it to disk (used by Save action).            
+            offer a dialogue to save it to disk (used by Save action).
         """
         request = self.request
         request.setHttpHeader("Content-type: text/plain; charset=%s" % config.charset)
@@ -1034,7 +1034,7 @@
             request.http_redirect('%s/%s?action=show&redirect=%s' % (
                 request.getScriptname(),
                 wikiutil.quoteWikinameURL(pi['redirect']),
-                wikiutil.url_quote_plus(self.page_name, ''),))
+                wikiutil.url_quote_plus(self.page_name, ''), ))
             return
 
         # if necessary, load the formatter
@@ -1071,7 +1071,7 @@
         lang = self.pi.get('language', request.cfg.language_default)
         request.setContentLanguage(lang)
 
-        # start document output        
+        # start document output
         page_exists = self.exists()
         if not content_only:
             if emit_headers:
@@ -1421,12 +1421,12 @@
         return links
 
     def parsePageLinks(self, request):
-        """ Parse page links by formatting with a pagelinks formatter 
-        
+        """ Parse page links by formatting with a pagelinks formatter
+
         This is a old hack to get the pagelinks by rendering the page
         with send_page. We can remove this hack after factoring
         send_page and send_page_content into small reuseable methods.
-        
+
         More efficient now by using special pagelinks formatter and
         redirecting possible output into null file.
         """
@@ -1491,7 +1491,7 @@
 
     def getACL(self, request):
         """ Get cached ACLs of this page.
-        
+
         Return cached ACL or invoke parseACL and update the cache.
 
         @param request: the request object
@@ -1519,7 +1519,7 @@
                 if currentRevision != 99999999:
                     # don't use cache for non existing pages
                     # otherwise in the process of creating copies by filesys.copytree (PageEditor.copyPage)
-                    # the first may test will create a cache entry with the default_acls for a non existing page 
+                    # the first may test will create a cache entry with the default_acls for a non existing page
                     # At the time the page is created acls on that page would be ignored until the process
                     # is completed by adding a log entry into edit-log
                     cache_data = (currentRevision, acl)
@@ -1529,8 +1529,8 @@
             return acl
 
     def parseACL(self):
-        """ Return ACLs parsed from the last available revision 
-        
+        """ Return ACLs parsed from the last available revision
+
         The effective ACL is always from the last revision, even if
         you access an older revision.
         """
@@ -1583,7 +1583,7 @@
 
     def isConflict(self):
         """ Returns true if there is a known editing conflict for that page.
-        
+
         @return: true if there is a known conflict.
         """
 
@@ -1592,7 +1592,7 @@
 
     def setConflict(self, state):
         """ Sets the editing conflict flag.
-        
+
         @param state: bool, true if there is a conflict.
         """
         cache = caching.CacheEntry(self.request, self, 'conflict', scope='item')
--- a/MoinMoin/PageEditor.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/PageEditor.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,7 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 """
     MoinMoin - PageEditor class
-    
+
     PageEditor is used for r/w access to a wiki page (edit, rename, delete operations).
 
     TODO:
@@ -9,7 +9,7 @@
     * The editor code should be modularized so we will be able to use it for any
       text/* mimetype data with some special features enabled depending on the
       mimetype (e.g. enable wiki markup help when editing wiki mimetype).
-  
+
     @copyright: 2000-2004 by Juergen Hermann <jh@web.de>,
                 2005-2007 by MoinMoin:ThomasWaldmann,
                 2007 by MoinMoin:ReimarBauer
@@ -76,7 +76,7 @@
 
     def __init__(self, request, page_name, **keywords):
         """ Create page editor object.
-        
+
         @param page_name: name of the page
         @param request: the request object
         @keyword do_revision_backup: if 0, suppress making a page backup per revision
@@ -276,11 +276,11 @@
             if request.user.may.read(template_page):
                 raw_body = Page(request, template_page).get_raw_body()
                 if raw_body:
-                    request.write(_("[Content of new page loaded from %s]") % (template_page,), '<br>')
+                    request.write(_("[Content of new page loaded from %s]") % (template_page, ), '<br>')
                 else:
-                    request.write(_("[Template %s not found]") % (template_page,), '<br>')
+                    request.write(_("[Template %s not found]") % (template_page, ), '<br>')
             else:
-                request.write(_("[You may not read %s]") % (template_page,), '<br>')
+                request.write(_("[You may not read %s]") % (template_page, ), '<br>')
 
         # Make backup on previews - but not for new empty pages
         if not use_draft and preview and raw_body:
@@ -323,7 +323,7 @@
 
         # Generate default content for new pages
         if not raw_body:
-            raw_body = _('Describe %s here.') % (self.page_name,)
+            raw_body = _('Describe %s here.') % (self.page_name, )
 
         # send form
         request.write('<form id="editor" method="post" action="%s/%s#preview" onSubmit="flgChange = false;">' % (
@@ -339,7 +339,7 @@
         request.write(unicode(html.INPUT(type="hidden", name="action", value="edit")))
 
         # Send revision of the page our edit is based on
-        request.write('<input type="hidden" name="rev" value="%d">' % (rev,))
+        request.write('<input type="hidden" name="rev" value="%d">' % (rev, ))
 
         # Create and send a ticket, so we can check the POST
         request.write('<input type="hidden" name="ticket" value="%s">' % wikiutil.createTicket(request))
@@ -370,12 +370,12 @@
         request.write('''
 <input class="button" type="submit" name="button_save" value="%s" onClick="flgChange = false;">
 <input class="button" type="submit" name="button_preview" value="%s" onClick="flgChange = false;">
-''' % (save_button_text, _('Preview'),))
+''' % (save_button_text, _('Preview'), ))
 
         if not (request.cfg.editor_force and request.cfg.editor_default == 'text'):
             request.write('''
 <input id="switch2gui" style="display: none;" class="button" type="submit" name="button_switch" value="%s">
-''' % (_('GUI Mode'),))
+''' % (_('GUI Mode'), ))
 
         if loadable_draft:
             request.write('''
@@ -388,7 +388,7 @@
 %s
 <input class="button" type="submit" name="button_cancel" value="%s">
 <input type="hidden" name="editor" value="text">
-''' % (button_spellcheck, cancel_button_text,))
+''' % (button_spellcheck, cancel_button_text, ))
 
         # Add textarea with page text
         self.sendconfirmleaving()
@@ -508,7 +508,7 @@
         newpage = PageEditor(request, newpagename)
 
         pageexists_error = _("""'''A page with the name {{{'%s'}}} already exists.'''
-Try a different name.""") % (newpagename,)
+Try a different name.""") % (newpagename, )
 
         # Check whether a page with the new name already exists
         if newpage.exists(includeDeleted=1):
@@ -575,7 +575,7 @@
 
         pageexists_error = _("""'''A page with the name {{{'%s'}}} already exists.'''
 
-Try a different name.""") % (newpagename,)
+Try a different name.""") % (newpagename, )
 
         # Check whether a page with the new name already exists
         if newpage.exists(includeDeleted=1):
@@ -648,11 +648,11 @@
         try:
             event = PageDeletedEvent(request, self, comment)
             send_event(event)
-            
+
             msg = self.saveText(u"deleted\n", 0, comment=comment or u'', index=1, deleted=True)
             msg = msg.replace(
                 _("Thank you for your changes. Your attention to detail is appreciated."),
-                _('Page "%s" was successfully deleted!') % (self.page_name,))
+                _('Page "%s" was successfully deleted!') % (self.page_name, ))
 
         except self.SaveError, message:
             # XXX do not only catch base class SaveError here, but
@@ -703,7 +703,7 @@
 
     def _expand_variables(self, text):
         """ Expand @VARIABLE@ in `text`and return the expanded text.
-        
+
         @param text: current text of wikipage
         @rtype: string
         @return: new text of wikipage, variables replaced
@@ -1028,7 +1028,7 @@
             # set success msg
             msg = _("Thank you for your changes. Your attention to detail is appreciated.")
 
-            # determine action for edit log 
+            # determine action for edit log
             if action == 'SAVE' and not self.exists():
                 action = 'SAVENEW'
             comment = kw.get('comment', u'')
--- a/MoinMoin/PageGraphicalEditor.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/PageGraphicalEditor.py	Mon Jul 02 23:33:20 2007 +0200
@@ -173,11 +173,11 @@
             if request.user.may.read(template_page):
                 raw_body = Page(request, template_page).get_raw_body()
                 if raw_body:
-                    request.write(_("[Content of new page loaded from %s]") % (template_page,), '<br>')
+                    request.write(_("[Content of new page loaded from %s]") % (template_page, ), '<br>')
                 else:
-                    request.write(_("[Template %s not found]") % (template_page,), '<br>')
+                    request.write(_("[Template %s not found]") % (template_page, ), '<br>')
             else:
-                request.write(_("[You may not read %s]") % (template_page,), '<br>')
+                request.write(_("[You may not read %s]") % (template_page, ), '<br>')
 
         # Make backup on previews - but not for new empty pages
         if not use_draft and preview and raw_body:
@@ -220,7 +220,7 @@
 
         # Generate default content for new pages
         if not raw_body:
-            raw_body = _('Describe %s here.') % (self.page_name,)
+            raw_body = _('Describe %s here.') % (self.page_name, )
 
         # send form
         request.write('<form id="editor" method="post" action="%s/%s#preview">' % (
@@ -236,12 +236,12 @@
         request.write(unicode(html.INPUT(type="hidden", name="action", value="edit")))
 
         # Send revision of the page our edit is based on
-        request.write('<input type="hidden" name="rev" value="%d">' % (rev,))
+        request.write('<input type="hidden" name="rev" value="%d">' % (rev, ))
 
         # Add src format (e.g. 'wiki') into a hidden form field, so that
         # we can load the correct converter after POSTing.
         request.write('<input type="hidden" name="format" value="%s">' % self.pi['format'])
-        
+
         # Create and send a ticket, so we can check the POST
         request.write('<input type="hidden" name="ticket" value="%s">' % wikiutil.createTicket(request))
 
@@ -271,7 +271,7 @@
 <input class="button" type="submit" name="button_save" value="%s">
 <input class="button" type="submit" name="button_preview" value="%s">
 <input class="button" type="submit" name="button_switch" value="%s">
-''' % (save_button_text, _('Preview'), _('Text mode'),))
+''' % (save_button_text, _('Preview'), _('Text mode'), ))
 
         if loadable_draft:
             request.write('''
@@ -284,7 +284,7 @@
 %s
 <input class="button" type="submit" name="button_cancel" value="%s">
 <input type="hidden" name="editor" value="gui">
-''' % (button_spellcheck, cancel_button_text,))
+''' % (button_spellcheck, cancel_button_text, ))
 
         self.sendconfirmleaving() # TODO update state of flgChange to make this work, see PageEditor
 
--- a/MoinMoin/__init__.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/__init__.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,6 +1,6 @@
 # -*- coding: iso-8859-1 -*-
 """
-MoinMoin Version 1.7.0alpha 
+MoinMoin Version 1.7.0alpha
 
 @copyright: 2000-2006 by Juergen Hermann <jh@web.de>,
             2002-2007 MoinMoin:ThomasWaldmann
--- a/MoinMoin/_template.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/_template.py	Mon Jul 02 23:33:20 2007 +0200
@@ -4,7 +4,7 @@
 
     <what this stuff does ... - verbose enough>
 
-    @copyright: 2007 MoinMoin:YourNameHere 
+    @copyright: 2007 MoinMoin:YourNameHere
     @license: GNU GPL, see COPYING for details.
 """
 
--- a/MoinMoin/_tests/_test_template.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/_tests/_test_template.py	Mon Jul 02 23:33:20 2007 +0200
@@ -22,10 +22,10 @@
     See http://codespeak.net/py/dist/test.html for reference.
     """
     def testSimplest(self):
-        """ module_tested: test description... 
-        
+        """ module_tested: test description...
+
         Function name MUST start with 'test' to be included in the
-        tests. 
+        tests.
         """
         # You can access the current request with self.request. It is
         # injected for you into the test class by moin test framework.
--- a/MoinMoin/_tests/compat.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/_tests/compat.py	Mon Jul 02 23:33:20 2007 +0200
@@ -9,8 +9,8 @@
         honouring setUp and tearDown semantics.
     """
     def execute(self, session):
-        boundmethod = self.obj 
-        instance = boundmethod.im_self 
+        boundmethod = self.obj
+        instance = boundmethod.im_self
         instance.setUp()
         try:
             boundmethod()
--- a/MoinMoin/_tests/test_PageEditor.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/_tests/test_PageEditor.py	Mon Jul 02 23:33:20 2007 +0200
@@ -40,7 +40,7 @@
 
 class TestExpandUserName(unittest.TestCase):
     """ Base class for user name tests
-    
+
     Set user name during tests.
     """
     pagename = u'AutoCreatedMoinMoinTemporaryTestPage'
@@ -128,7 +128,7 @@
 
     def createTestPage(self):
         """ Create temporary page, bypass logs, notification and backups
-        
+
         TODO: this code is very fragile, any change in the
         implementation will break this test. Need to factor PageEditor
         to make it possible to create page without loging and notifying.
--- a/MoinMoin/_tests/test_sourcecode.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/_tests/test_sourcecode.py	Mon Jul 02 23:33:20 2007 +0200
@@ -24,15 +24,15 @@
     '/wiki/htdocs/applets/FCKeditor', # 3rd party GUI editor
 ]
 
-TRAILING_SPACES = 'ignore' # 'ignore', 'test' or 'fix'
-                           # use 'fix' with extreme caution and in a separate changeset!
+TRAILING_SPACES = 'test' # 'ignore', 'test' or 'fix'
+                         # use 'fix' with extreme caution and in a separate changeset!
 FIX_TS_RE = re.compile(r' +$', re.M) # 'fix' mode: everything matching the trailing space re will be removed
 
 PEP8_CHECKS = True
 
 def pep8_error_count(path):
     # process_options initializes some data structures and MUST be called before each Checker().check_all()
-    pep8.process_options(['pep8', '--ignore=E202,E302,E401,E501,E701,W', '--show-source', 'dummy_path'])
+    pep8.process_options(['pep8', '--ignore=E202,E221,E222,E241,E301,E302,E401,E501,E701,W', '--show-source', 'dummy_path'])
     error_count = pep8.Checker(path).check_all()
     return error_count
 
@@ -41,12 +41,12 @@
         f = file(path, 'rb')
         data = f.read()
         f.close()
-        assert '\t' not in data, "%r contains tabs (please use 4 space chars for indenting)!" % (reldir,)
-        assert not data or data.endswith('\n'), "%r does not end with a newline char!" % (reldir,)
-        assert '\r\n' not in data, "%r contains crlf line endings (please use UNIX style, lf only)!" % (reldir,)
+        assert '\t' not in data, "%r contains tabs (please use 4 space chars for indenting)!" % (reldir, )
+        assert not data or data.endswith('\n'), "%r does not end with a newline char!" % (reldir, )
+        assert '\r\n' not in data, "%r contains crlf line endings (please use UNIX style, lf only)!" % (reldir, )
         if TRAILING_SPACES != 'ignore':
             if TRAILING_SPACES == 'test':
-                assert ' \n' not in data, "%r contains line(s) with trailing spaces!" % (reldir,)
+                assert ' \n' not in data, "%r contains line(s) with trailing spaces!" % (reldir, )
             elif TRAILING_SPACES == 'fix':
                 data = FIX_TS_RE.sub('', data)
                 f = file(path, 'wb')
--- a/MoinMoin/_tests/test_user.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/_tests/test_user.py	Mon Jul 02 23:33:20 2007 +0200
@@ -55,7 +55,7 @@
 
     def tearDown(self):
         """ Run after each test
-        
+
         Remove user and reset user listing cache.
         """
         # Remove user file and user
@@ -88,7 +88,7 @@
         password = name
         self.createUser(name, password)
 
-        # Try to "login"           
+        # Try to "login"
         theUser = user.User(self.request, name=name, password=password)
         self.failUnless(theUser.valid, "Can't login with ascii password")
 
@@ -105,9 +105,9 @@
 
     def testOldNonAsciiPassword(self):
         """ user: login with non-ascii password in pre 1.3 user file
-        
-        When trying to login with an old non-ascii password in the user 
-        file, utf-8 encoded password will not match. In this case, try 
+
+        When trying to login with an old non-ascii password in the user
+        file, utf-8 encoded password will not match. In this case, try
         all other encoding available on pre 1.3 before failing.
         """
         # Create test user
@@ -117,14 +117,14 @@
         password = name
         self.createUser(name, password, charset='iso-8859-1')
 
-        # Try to "login"           
+        # Try to "login"
         theUser = user.User(self.request, name=name, password=password)
         self.failUnless(theUser.valid, "Can't login with old unicode password")
 
     def testReplaceOldNonAsciiPassword(self):
         """ user: login replace old non-ascii password in pre 1.3 user file
-        
-        When trying to login with an old non-ascii password in the user 
+
+        When trying to login with an old non-ascii password in the user
         file, the password hash should be replaced with new utf-8 hash.
         """
         # Create test user
@@ -133,7 +133,7 @@
         name = u'__Jürgen Herman__'
         password = name
         self.createUser(name, password, charset='iso-8859-1')
-        # Login - this should replace the old password in the user file         
+        # Login - this should replace the old password in the user file
         theUser = user.User(self.request, name=name, password=password)
         # Login again - the password should be new unicode password
         expected = user.encodePassword(password)
@@ -173,8 +173,8 @@
     # Helpers ---------------------------------------------------------
 
     def createUser(self, name, password, charset='utf-8'):
-        """ helper to create test user 
-        
+        """ helper to create test user
+
         charset is used to create user with pre 1.3 password hash
         """
         # Hack self.request form to contain the password
--- a/MoinMoin/_tests/test_wikidicts.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/_tests/test_wikidicts.py	Mon Jul 02 23:33:20 2007 +0200
@@ -59,7 +59,7 @@
     def testStripWhitespace(self):
         """ wikidicts: initFromText: strip whitespace around items """
         text = """
- *   take this  
+ *   take this
 """
         assert self.getMembers(text) == ['take this']
 
@@ -82,14 +82,14 @@
 
 Empty lines ignored, so is this text
 Next line has key with empty value
- Empty string:: 
+ Empty string::\x20
  Last:: last item
 '''
         d = wikidicts.Dict(self.request, '')
         d.initFromText(text)
         assert d['First'] == 'first item'
         assert d['text with spaces'] == 'second item'
-        assert d['Empty string'] == ''
+        assert d['Empty string'] == '' # XXX fails if trailing blank is missing
         assert d['Last'] == 'last item'
         assert len(d) == 4
 
--- a/MoinMoin/_tests/test_wikisync.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/_tests/test_wikisync.py	Mon Jul 02 23:33:20 2007 +0200
@@ -32,7 +32,7 @@
         tags = TagStore(self.page) # reload
         dummy = repr(tags.get_all_tags()) # this should not raise
         self.assert_(tags.get_all_tags()[0].remote_rev == 1)
-    
+
     def tearDown(self):
         tags = TagStore(self.page)
         tags.clear()
--- a/MoinMoin/action/AttachFile.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/AttachFile.py	Mon Jul 02 23:33:20 2007 +0200
@@ -206,7 +206,7 @@
     fpath = os.path.join(attach_dir, target).encode(config.charset)
     exists = os.path.exists(fpath)
     if exists and not overwrite:
-        msg = _("Attachment '%(target)s' already exists.") % { 'target': target, }
+        msg = _("Attachment '%(target)s' already exists.") % {'target': target, }
     else:
         if exists:
             try:
@@ -220,7 +220,7 @@
             stream.close()
 
         _addLogEntry(request, 'ATTNEW', pagename, target)
-        
+
         event = FileAttachedEvent(request, pagename, target, len(filecontent))
         messages = send_event(event)
         msg = "".join(messages)
@@ -612,7 +612,7 @@
         else:
             msg = _('You are not allowed to view attachments of this page.')
     else:
-        msg = _('Unsupported upload action: %s') % (wikiutil.escape(do),)
+        msg = _('Unsupported upload action: %s') % (wikiutil.escape(do), )
 
     if msg:
         error_msg(pagename, request, msg)
@@ -752,7 +752,7 @@
             return
 
         if new_attachment_path != attachment_path:
-        # move file  
+        # move file
             filesys.rename(attachment_path, new_attachment_path)
             _addLogEntry(request, 'ATTDEL', pagename, attachment)
             _addLogEntry(request, 'ATTNEW', new_pagename, new_attachment)
@@ -1001,7 +1001,7 @@
 
 
         request.write(request.formatter.preformatted(1))
-        # If we have text but no colorizing parser we try to decode file contents. 
+        # If we have text but no colorizing parser we try to decode file contents.
         content = open(fpath, 'r').read()
         content = wikiutil.decodeUnknownInput(content)
         content = wikiutil.escape(content)
@@ -1029,7 +1029,7 @@
     macro.request = request
     macro.formatter = request.html_formatter
 
-    # use EmbedObject to view valid mime types 
+    # use EmbedObject to view valid mime types
     from MoinMoin.macro.EmbedObject import EmbedObject
     if mt is None:
         request.write('<p>' + _("Unknown file type, cannot display this attachment inline.") + '</p>')
--- a/MoinMoin/action/CopyPage.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/CopyPage.py	Mon Jul 02 23:33:20 2007 +0200
@@ -89,7 +89,7 @@
 
             d = {
                 'subpage': subpages,
-                'subpages_checked':('', 'checked')[self.request.form.get('subpages_checked', ['0'])[0] == '1'],
+                'subpages_checked': ('', 'checked')[self.request.form.get('subpages_checked', ['0'])[0] == '1'],
                 'subpage_label': _('Copy all /subpages too?'),
                 'pagename': wikiutil.escape(self.pagename),
                 'newname_label': _("New name"),
@@ -105,13 +105,13 @@
 <table>
     <tr>
     <dd>
-        %(subpage_label)s<input type="checkbox" name="copy_subpages" value="1" %(subpages_checked)s> 
+        %(subpage_label)s<input type="checkbox" name="copy_subpages" value="1" %(subpages_checked)s>
     </dd>
     <dd>
         <class="label"><subpage> %(subpage)s</subpage>
-    </dd>   
+    </dd>
     </tr>
-</table>       
+</table>
 <table>
     <tr>
         <td class="label"><label>%(newname_label)s</label></td>
--- a/MoinMoin/action/DeletePage.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/DeletePage.py	Mon Jul 02 23:33:20 2007 +0200
@@ -79,7 +79,7 @@
 
             d = {
                 'subpage': subpages,
-                'subpages_checked':('', 'checked')[self.request.form.get('subpages_checked', ['0'])[0] == '1'],
+                'subpages_checked': ('', 'checked')[self.request.form.get('subpages_checked', ['0'])[0] == '1'],
                 'subpage_label': _('Delete all /subpages too?'),
                 'comment_label': _("Optional reason for the deletion"),
                 'buttons_html': buttons_html,
@@ -94,7 +94,7 @@
 <tr>
 <dd>
 %(subpage_label)s<input type="checkbox" name="delete_subpages" value="1" %(subpages_checked)s> </dd>
-<dd><class="label"><subpage> %(subpage)s</subpage></dd>   
+<dd><class="label"><subpage> %(subpage)s</subpage></dd>
 </tr>
 </table>
 <table>
--- a/MoinMoin/action/Despam.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/Despam.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,7 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 """
     MoinMoin - Despam action
-    
+
     Mass revert changes done by some specific author / bot.
 
     @copyright: 2005 by ???, Thomas Waldmann
@@ -114,7 +114,7 @@
                 rev = line.rev
                 break
 
-    if rev == u"00000000": # page created by spammer 
+    if rev == u"00000000": # page created by spammer
         comment = u"Page deleted by Despam action"
         pg = PageEditor.PageEditor(request, pagename, do_editor_backup=0)
         try:
--- a/MoinMoin/action/LikePages.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/LikePages.py	Mon Jul 02 23:33:20 2007 +0200
@@ -30,14 +30,14 @@
     # No matches
     if not matches:
         Page(request, pagename).send_page(
-             msg=_('No pages like "%s"!') % (pagename,))
+             msg=_('No pages like "%s"!') % (pagename, ))
         return
 
     # One match - display it
     if len(matches) == 1:
         Page(request, matches.keys()[0]).send_page(
              msg=_('Exactly one page like "%s" found, redirecting to page.') % (
-            pagename,))
+            pagename, ))
         return
 
     # more than one match, list 'em
@@ -59,9 +59,9 @@
     request.theme.send_footer(pagename)
     request.theme.send_closing_html()
 
-def findMatches(pagename, request, s_re=None, e_re=None,):
+def findMatches(pagename, request, s_re=None, e_re=None):
     """ Find like pages
-    
+
     @param pagename: name to match
     @param request: current reqeust
     @param s_re: start re for wiki matching
@@ -207,8 +207,8 @@
     _showMatchGroup(request, matches, keys, 8, pagename, show_count)
     _showMatchGroup(request, matches, keys, 4, "%s/..." % pagename, show_count)
     _showMatchGroup(request, matches, keys, 3, "%s...%s" % (start, end), show_count)
-    _showMatchGroup(request, matches, keys, 1, "%s..." % (start,), show_count)
-    _showMatchGroup(request, matches, keys, 2, "...%s" % (end,), show_count)
+    _showMatchGroup(request, matches, keys, 1, "%s..." % (start, ), show_count)
+    _showMatchGroup(request, matches, keys, 2, "...%s" % (end, ), show_count)
 
 
 def _showMatchGroup(request, matches, keys, match, title, show_count=True):
--- a/MoinMoin/action/Load.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/Load.py	Mon Jul 02 23:33:20 2007 +0200
@@ -2,7 +2,7 @@
 """
     MoinMoin - Action macro for page creation from file or attach file to current page
 
-    @copyright: 2007 MoinMoin:ReimarBauer 
+    @copyright: 2007 MoinMoin:ReimarBauer
     @license: GNU GPL, see COPYING for details.
 """
 import os
--- a/MoinMoin/action/LocalSiteMap.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/LocalSiteMap.py	Mon Jul 02 23:33:20 2007 +0200
@@ -2,8 +2,8 @@
 """
     MoinMoin - LocalSiteMap action
 
-    The LocalSiteMap action gives you a page that shows 
-    nearby links.  This is an example of what appears on the 
+    The LocalSiteMap action gives you a page that shows
+    nearby links.  This is an example of what appears on the
     page (names are linkable on the real page):
 
     MoinMoin
--- a/MoinMoin/action/PackagePages.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/PackagePages.py	Mon Jul 02 23:33:20 2007 +0200
@@ -82,7 +82,7 @@
         if not pages:
             raise ActionError(self.makeform(_('No pages like "%s"!') % wikiutil.escape(pagelist)))
 
-        pagelist = ', '.join([getattr(page, "page_name") for page in  pages])
+        pagelist = ', '.join([getattr(page, "page_name") for page in pages])
         target = wikiutil.taintfilename(packagename)
 
         if not target:
--- a/MoinMoin/action/RenamePage.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/RenamePage.py	Mon Jul 02 23:33:20 2007 +0200
@@ -88,7 +88,7 @@
 
             d = {
                 'subpage': subpages,
-                'subpages_checked':('', 'checked')[self.request.form.get('subpages_checked', ['0'])[0] == '1'],
+                'subpages_checked': ('', 'checked')[self.request.form.get('subpages_checked', ['0'])[0] == '1'],
                 'subpage_label': _('Rename all /subpages too?'),
                 'pagename': wikiutil.escape(self.pagename),
                 'newname_label': _("New name"),
@@ -104,13 +104,13 @@
 <table>
     <tr>
     <dd>
-        %(subpage_label)s<input type="checkbox" name="rename_subpages" value="1" %(subpages_checked)s> 
+        %(subpage_label)s<input type="checkbox" name="rename_subpages" value="1" %(subpages_checked)s>
     </dd>
     <dd>
         <class="label"><subpage> %(subpage)s</subpage>
-    </dd>   
+    </dd>
     </tr>
-</table>       
+</table>
 <table>
     <tr>
         <td class="label"><label>%(newname_label)s</label></td>
@@ -132,7 +132,7 @@
     </tr>
 </table>
 ''' % d
-        
+
         else:
             d = {
                 'pagename': wikiutil.escape(self.pagename),
--- a/MoinMoin/action/Save.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/Save.py	Mon Jul 02 23:33:20 2007 +0200
@@ -2,7 +2,7 @@
 """
     MoinMoin - Action for saving a page
 
-    @copyright: 2007 MoinMoin:ReimarBauer 
+    @copyright: 2007 MoinMoin:ReimarBauer
     @license: GNU GPL, see COPYING for details.
 """
 
--- a/MoinMoin/action/SpellCheck.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/SpellCheck.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,8 +1,8 @@
 # -*- coding: iso-8859-1 -*-
-"""  
+"""
     MoinMoin - Spelling Action
-     
-    Word adding based on code by Christian Bird <chris.bird@lineo.com> 
+
+    Word adding based on code by Christian Bird <chris.bird@lineo.com>
 
     This action checks for spelling errors in a page using one or several
     word lists.
@@ -16,8 +16,8 @@
     the list of valid words, if that page exists.
 
     @copyright: 2001 Richard Jones <richard@bizarsoftware.com.au>,
-                2001-2004 Juergen Hermann <jh@web.de>  
-    @license: GNU GPL, see COPYING for details.  
+                2001-2004 Juergen Hermann <jh@web.de>
+    @license: GNU GPL, see COPYING for details.
 """
 
 import os, re, codecs
@@ -169,7 +169,7 @@
 
         # build regex recognizing the bad words
         badwords_re = r'(^|(?<!\w))(%s)(?!\w)'
-        badwords_re = badwords_re % ("|".join([re.escape(bw) for bw in badwords]),)
+        badwords_re = badwords_re % ("|".join([re.escape(bw) for bw in badwords]), )
         badwords_re = re.compile(badwords_re, re.UNICODE)
 
         lsw_msg = ''
@@ -192,7 +192,7 @@
 
         checkbox = '<input type="checkbox" name="newwords" value="%(word)s">%(word)s&nbsp;&nbsp;'
         msg = msg + (
-            " ".join([checkbox % { 'word': wikiutil.escape(w), } for w in badwords]) +
+            " ".join([checkbox % {'word': wikiutil.escape(w), } for w in badwords]) +
             '<p><input type="submit" name="button_newwords" value="%s"></p>' %
                 _('Add checked words to dictionary')
         )
--- a/MoinMoin/action/__init__.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/__init__.py	Mon Jul 02 23:33:20 2007 +0200
@@ -14,12 +14,12 @@
     User actions starting with a lowercase letter can be used to work
     together with a user macro; those actions a likely to work only if
     invoked BY that macro, and are thus hidden from the user interface.
-    
+
     Additionally to the usual stuff, we provide an ActionBase class here with
     some of the usual base functionality for an action, like checking
     actions_excluded, making and checking tickets, rendering some form,
     displaying errors and doing stuff after an action.
-    
+
     @copyright: 2000-2004 Juergen Hermann <jh@web.de>,
                 2006 MoinMoin:ThomasWaldmann
     @license: GNU GPL, see COPYING for details.
--- a/MoinMoin/action/backup.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/backup.py	Mon Jul 02 23:33:20 2007 +0200
@@ -34,7 +34,7 @@
         "Content-Disposition: inline; filename=\"%s\"" % filename, ])
 
     tar = tarfile.open(fileobj=request, mode="w|%s" % request.cfg.backup_compression)
-    # allow GNU tar's longer file/pathnames 
+    # allow GNU tar's longer file/pathnames
     tar.posix = False
     exclude = re.compile("|".join(request.cfg.backup_exclude))
     for path in request.cfg.backup_include:
@@ -49,7 +49,7 @@
     targetdir = request.cfg.backup_restore_target_dir
     try:
         tar = tarfile.open(fileobj=file(filename), mode="r|%s" % request.cfg.backup_compression)
-        # allow GNU tar's longer file/pathnames 
+        # allow GNU tar's longer file/pathnames
         tar.posix = False
         files = []
         dirs = []
--- a/MoinMoin/action/diff.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/diff.py	Mon Jul 02 23:33:20 2007 +0200
@@ -71,7 +71,7 @@
     request.setContentLanguage(request.lang)
 
     request.emit_http_headers()
-    request.theme.send_title(_('Diff for "%s"') % (pagename,), pagename=pagename, allow_doubleclick=1)
+    request.theme.send_title(_('Diff for "%s"') % (pagename, ), pagename=pagename, allow_doubleclick=1)
 
     if rev1 > 0 and rev2 > 0 and rev1 > rev2 or rev1 == 0 and rev2 > 0:
         rev1, rev2 = rev2, rev1
@@ -100,7 +100,7 @@
     request.write(f.paragraph(1, css_class="diff-header"))
     request.write(f.text(_('Differences between revisions %d and %d') % (oldpage.get_real_rev(), newpage.get_real_rev())))
     if edit_count > 1:
-        request.write(f.text(' ' + _('(spanning %d versions)') % (edit_count,)))
+        request.write(f.text(' ' + _('(spanning %d versions)') % (edit_count, )))
     request.write(f.paragraph(0))
 
     if request.user.show_fancy_diff:
--- a/MoinMoin/action/fckdialog.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/fckdialog.py	Mon Jul 02 23:33:20 2007 +0200
@@ -23,7 +23,7 @@
   <title>Insert Macro</title>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   <meta content="noindex,nofollow" name="robots">
-  <script src="%s/applets/FCKeditor/editor/dialog/common/fck_dialog_common.js" type="text/javascript"></script>  
+  <script src="%s/applets/FCKeditor/editor/dialog/common/fck_dialog_common.js" type="text/javascript"></script>
   <script language="javascript">
 
 var oEditor = window.parent.InnerDialogLoaded() ;
@@ -34,11 +34,11 @@
 {
  // First of all, translate the dialog box texts
  oEditor.FCKLanguageManager.TranslatePage( document ) ;
- 
+
  OnChange( "BR" );
- 
+
  // Show the "Ok" button.
- window.parent.SetOkButton( true ) ; 
+ window.parent.SetOkButton( true ) ;
 }
 
 function Ok()
@@ -48,7 +48,7 @@
   alert( FCKLang.MacroErrNoName ) ;
   return false ;
  }
- 
+
  FCKMacros.Add( txtName.value ) ;
  return true ;
 }
@@ -218,7 +218,7 @@
            %s
            </select>
           <td>
-         </tr> 
+         </tr>
 ''' % "\n".join(['<option value="%s">%s</option>' % (page, page)
                  for page in pages])
     else:
@@ -250,19 +250,19 @@
 <!--
  * FCKeditor - The text editor for internet
  * Copyright (C) 2003-2004 Frederico Caldeira Knabben
- * 
+ *
  * Licensed under the terms of the GNU Lesser General Public License:
  *   http://www.opensource.org/licenses/lgpl-license.php
- * 
+ *
  * For further information visit:
  *   http://www.fckeditor.net/
- * 
+ *
  * File Name: fck_link.html
  *  Link dialog window.
- * 
+ *
  * Version:  2.0 FC (Preview)
  * Modified: 2005-02-18 23:55:22
- * 
+ *
  * File Authors:
  *   Frederico Caldeira Knabben (fredck@fckeditor.net)
 -->
@@ -308,7 +308,7 @@
         </tr>
         %(page_list)s
        </table>
-       </form> 
+       </form>
       </td>
      </tr>
     </table>
@@ -356,7 +356,7 @@
     </table>
     <br />
    </div>
-  </div> 
+  </div>
  </body>
 </html>
 ''' % locals())
@@ -384,7 +384,7 @@
            %s
            </select>
           <td>
-         </tr> 
+         </tr>
 ''' % "\n".join(['<option value="%s">%s</option>' % (page, page)
                  for page in pages])
     else:
@@ -400,19 +400,19 @@
 <!--
  * FCKeditor - The text editor for internet
  * Copyright (C) 2003-2004 Frederico Caldeira Knabben
- * 
+ *
  * Licensed under the terms of the GNU Lesser General Public License:
  *   http://www.opensource.org/licenses/lgpl-license.php
- * 
+ *
  * For further information visit:
  *   http://www.fckeditor.net/
- * 
+ *
  * File Name: fck_attachment.html
  *  Attachment dialog window.
- * 
+ *
  * Version:  2.0 FC (Preview)
  * Modified: 2005-02-18 23:55:22
- * 
+ *
  * File Authors:
  *   Frederico Caldeira Knabben (fredck@fckeditor.net)
 -->
@@ -445,12 +445,12 @@
          </td>
         </tr>
        </table>
-       </form> 
+       </form>
       </td>
      </tr>
     </table>
    </div>
-  </div> 
+  </div>
  </body>
 </html>
 ''' % locals())
@@ -466,13 +466,13 @@
 <!--
  * FCKeditor - The text editor for internet
  * Copyright (C) 2003-2004 Frederico Caldeira Knabben
- * 
+ *
  * Licensed under the terms of the GNU Lesser General Public License:
  *   http://www.opensource.org/licenses/lgpl-license.php
- * 
+ *
  * For further information visit:
  *   http://www.fckeditor.net/
- * 
+ *
  * File Authors:
  *   Frederico Caldeira Knabben (fredck@fckeditor.net)
  *   Florian Festi
--- a/MoinMoin/action/fullsearch.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/fullsearch.py	Mon Jul 02 23:33:20 2007 +0200
@@ -3,7 +3,7 @@
     MoinMoin - fullsearch action
 
     This is the backend of the search form. Search pages and print results.
-    
+
     @copyright: 2001 by Juergen Hermann <jh@web.de>
     @license: GNU GPL, see COPYING for details.
 """
@@ -16,7 +16,7 @@
 def checkTitleSearch(request):
     """ Return 1 for title search, 0 for full text search, -1 for idiot spammer
         who tries to press all buttons at once.
-    
+
     When used in FullSearch macro, we have 'titlesearch' parameter with
     '0' or '1'. In standard search, we have either 'titlesearch' or
     'fullsearch' with localized string. If both missing, default to
--- a/MoinMoin/action/info.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/info.py	Mon Jul 02 23:33:20 2007 +0200
@@ -185,7 +185,7 @@
     request.setContentLanguage(request.lang)
     f = request.formatter
 
-    request.theme.send_title(_('Info for "%s"') % (title,), page=page)
+    request.theme.send_title(_('Info for "%s"') % (title, ), page=page)
     menu_items = [
         (_('Show "%(title)s"') % {'title': _('Revision History')},
          {'action': 'info'}),
--- a/MoinMoin/action/pollsistersites.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/pollsistersites.py	Mon Jul 02 23:33:20 2007 +0200
@@ -5,7 +5,7 @@
     This action fetches lists of page urls and page names from sister sites,
     so we can implement SisterWiki functionality.
     See: http://usemod.com/cgi-bin/mb.pl?SisterSitesImplementationGuide
-    
+
     @copyright: 2007 MoinMoin:ThomasWaldmann
     @license: GNU GPL, see COPYING for details.
 """
--- a/MoinMoin/action/revert.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/revert.py	Mon Jul 02 23:33:20 2007 +0200
@@ -40,7 +40,7 @@
         from MoinMoin import caching
         caching.CacheEntry(request, pg, key, scope='item').remove()
         caching.CacheEntry(request, pg, "pagelinks", scope='item').remove()
-        
+
         # Notify observers
         from MoinMoin.events import PageRevertedEvent, send_event
         e = PageRevertedEvent(request, pagename, request.rev, revstr)
--- a/MoinMoin/action/rss_rc.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/rss_rc.py	Mon Jul 02 23:33:20 2007 +0200
@@ -236,8 +236,8 @@
             handler.simpleNode(('wiki', 'status'), ('deleted', 'updated')[page.exists()])
             handler.simpleNode(('wiki', 'diff'), full_url(request, page, querystr={'action': 'diff'}))
             handler.simpleNode(('wiki', 'history'), full_url(request, page, querystr={'action': 'info'}))
-            # handler.simpleNode(('wiki', 'importance'), ) # ( major | minor ) 
-            # handler.simpleNode(('wiki', 'version'), ) # ( #PCDATA ) 
+            # handler.simpleNode(('wiki', 'importance'), ) # ( major | minor )
+            # handler.simpleNode(('wiki', 'version'), ) # ( #PCDATA )
 
             handler.endNode('item')
 
--- a/MoinMoin/action/sisterpages.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/sisterpages.py	Mon Jul 02 23:33:20 2007 +0200
@@ -5,7 +5,7 @@
     This action generates a list of page urls and page names, so that other wikis
     can implement SisterWiki functionality easily.
     See: http://usemod.com/cgi-bin/mb.pl?SisterSitesImplementationGuide
-    
+
     @copyright: 2007 MoinMoin:ThomasWaldmann
     @license: GNU GPL, see COPYING for details.
 """
--- a/MoinMoin/action/supplementation.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/supplementation.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,12 +1,12 @@
 # -*- coding: iso-8859-1 -*-
 """
     MoinMoin -  This Action is used to create a supplementation subpage e.g. a Discussion page below a comon page
-        
+
     Note:
     derived from the newpage macro by Vito Miliano (vito_moinnewpagewithtemplate@perilith.com) et al
 
-    @copyright: 2006-2007 MoinMoin:ReimarBauer  
-    @license: GNU GPL, see COPYING for details.  
+    @copyright: 2006-2007 MoinMoin:ReimarBauer
+    @license: GNU GPL, see COPYING for details.
 """
 from MoinMoin.Page import Page
 from MoinMoin.wikiutil import quoteWikinameURL
--- a/MoinMoin/action/titleindex.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/titleindex.py	Mon Jul 02 23:33:20 2007 +0200
@@ -29,10 +29,10 @@
     pages.sort()
 
     if mimetype == "text/xml":
-        request.write('<?xml version="1.0" encoding="%s"?>\r\n' % (config.charset,))
+        request.write('<?xml version="1.0" encoding="%s"?>\r\n' % (config.charset, ))
         request.write('<TitleIndex>\r\n')
         for name in pages:
-            request.write('  <Title>%s</Title>\r\n' % (util.TranslateCDATA(name),))
+            request.write('  <Title>%s</Title>\r\n' % (util.TranslateCDATA(name), ))
         request.write('</TitleIndex>\r\n')
     else:
         for name in pages:
--- a/MoinMoin/action/userprefs.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/userprefs.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,13 +1,13 @@
 # -*- coding: iso-8859-1 -*-
 """
     MoinMoin - UserPreferences action
-    
+
     This is a simple plugin, that adds a "UserPreferences" action.
     This action will display the UserPreferences page (or appropriate
     page in the reader's language), so that the user can login, or
     change his/her preferences.
 
-    However, as it is an action, the page that is displayed is not 
+    However, as it is an action, the page that is displayed is not
     changed. After submitting the form, the user is presented the
     same page he/she was seeing before, and the trail is not modified.
 
--- a/MoinMoin/auth/_PHPsessionParser.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/auth/_PHPsessionParser.py	Mon Jul 02 23:33:20 2007 +0200
@@ -138,7 +138,8 @@
 
     #print s
     p_s = loadSession("...")
-    import pprint; pprint.pprint(p_s)
+    import pprint
+    pprint.pprint(p_s)
     print time.clock() - a
     print listSessions()
 
--- a/MoinMoin/auth/__init__.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/auth/__init__.py	Mon Jul 02 23:33:20 2007 +0200
@@ -7,7 +7,7 @@
       * login(request, user_obj, **kw)
       * logout(request, user_obj, **kw)
       * request(request, user_obj, **kw)
-    
+
     The kw arguments that are passed in are currently:
        attended: boolean indicating whether a user (attended=True) or
                  a machine is requesting login, multistage auth is not
--- a/MoinMoin/auth/http.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/auth/http.py	Mon Jul 02 23:33:20 2007 +0200
@@ -57,7 +57,7 @@
             auth_type = env.get('AUTH_TYPE', '')
             if auth_type in ['Basic', 'Digest', 'NTLM', 'Negotiate', ]:
                 username = env.get('REMOTE_USER', '').decode(config.charset)
-                if auth_type in ('NTLM', 'Negotiate',):
+                if auth_type in ('NTLM', 'Negotiate', ):
                     # converting to standard case so the user can even enter wrong case
                     # (added since windows does not distinguish between e.g.
                     #  "Mike" and "mike")
--- a/MoinMoin/auth/ldap_login.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/auth/ldap_login.py	Mon Jul 02 23:33:20 2007 +0200
@@ -118,7 +118,7 @@
                         aliasname = sn
                 aliasname = aliasname.decode(coding)
 
-                u = user.User(request, auth_username=username, password="{SHA}NotStored", auth_method=self.name, auth_attribs=('name', 'password', 'email', 'mailto_author',))
+                u = user.User(request, auth_username=username, password="{SHA}NotStored", auth_method=self.name, auth_attribs=('name', 'password', 'email', 'mailto_author', ))
                 u.name = username
                 u.aliasname = aliasname
                 u.email = email
--- a/MoinMoin/auth/mysql_group.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/auth/mysql_group.py	Mon Jul 02 23:33:20 2007 +0200
@@ -12,7 +12,7 @@
 
 class MysqlGroupAuth(BaseAuth):
     """ Authorize via MySQL group DB.
-    
+
     We require an already-authenticated user_obj and
     check that the user is part of an authorized group.
     """
--- a/MoinMoin/auth/php_session.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/auth/php_session.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,7 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 """
     MoinMoin - PHP session cookie authentication
-    
+
     Currently supported systems:
 
         * eGroupware 1.2 ("egw")
--- a/MoinMoin/auth/sslclientcert.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/auth/sslclientcert.py	Mon Jul 02 23:33:20 2007 +0200
@@ -4,7 +4,7 @@
 
     Currently not supported for Twisted web server, but only for web servers
     setting SSL_CLIENT_* environment (e.g. Apache).
-    
+
     @copyright: 2003 Martin v. Loewis,
                 2006 MoinMoin:ThomasWaldmann
     @license: GNU GPL, see COPYING for details.
--- a/MoinMoin/config/multiconfig.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/config/multiconfig.py	Mon Jul 02 23:33:20 2007 +0200
@@ -25,10 +25,10 @@
 
 def _importConfigModule(name):
     """ Import and return configuration module and its modification time
-    
+
     Handle all errors except ImportError, because missing file is not
     always an error.
-    
+
     @param name: module name
     @rtype: tuple
     @return: module, modification time
@@ -89,7 +89,7 @@
 
 
 def _makeConfig(name):
-    """ Create and return a config instance 
+    """ Create and return a config instance
 
     Timestamp config with either module mtime or farmconfig mtime. This
     mtime can be used later to invalidate older caches.
@@ -262,11 +262,11 @@
     default_markup = 'wiki'
     docbook_html_dir = r"/usr/share/xml/docbook/stylesheet/nwalsh/html/" # correct for debian sarge
 
-    edit_bar = ['Edit', 'Comments', 'Discussion', 'Info', 'Subscribe', 'Quicklink', 'Attachments', 'ActionsMenu'] 
+    edit_bar = ['Edit', 'Comments', 'Discussion', 'Info', 'Subscribe', 'Quicklink', 'Attachments', 'ActionsMenu']
     editor_default = 'text' # which editor is called when nothing is specified
     editor_ui = 'freechoice' # which editor links are shown on user interface
     editor_force = False
-    editor_quickhelp = {# editor markup hints quickhelp 
+    editor_quickhelp = {# editor markup hints quickhelp
         'wiki': _("""\
  Emphasis:: [[Verbatim('')]]''italics''[[Verbatim('')]]; [[Verbatim(''')]]'''bold'''[[Verbatim(''')]]; [[Verbatim(''''')]]'''''bold italics'''''[[Verbatim(''''')]]; [[Verbatim('')]]''mixed ''[[Verbatim(''')]]'''''bold'''[[Verbatim(''')]] and italics''[[Verbatim('')]]; [[Verbatim(----)]] horizontal rule.
  Headings:: [[Verbatim(=)]] Title 1 [[Verbatim(=)]]; [[Verbatim(==)]] Title 2 [[Verbatim(==)]]; [[Verbatim(===)]] Title 3 [[Verbatim(===)]];   [[Verbatim(====)]] Title 4 [[Verbatim(====)]]; [[Verbatim(=====)]] Title 5 [[Verbatim(=====)]].
@@ -282,15 +282,15 @@
 Headings: Heading 1  Heading 2  Heading 3
           =========  ---------  ~~~~~~~~~
 
-Horizontal rule: ---- 
-Links: TrailingUnderscore_ `multi word with backticks`_ external_ 
+Horizontal rule: ----
+Links: TrailingUnderscore_ `multi word with backticks`_ external_
 
 .. _external: http://external-site.net/foo/
 
 Lists: * bullets; 1., a. numbered items.
 </pre>
 <br/>
-(!) For more help, see the 
+(!) For more help, see the
 <a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html">
 reStructuredText Quick Reference
 </a>.
@@ -347,7 +347,7 @@
 
     # some dangerous mimetypes (we don't use "content-disposition: inline" for them when a user
     # downloads such attachments, because the browser might execute e.g. Javascript contained
-    # in the HTML and steal your moin cookie or do other nasty stuff) 
+    # in the HTML and steal your moin cookie or do other nasty stuff)
     mimetypes_xss_protect = [
         'text/html',
         'application/x-shockwave-flash',
@@ -675,10 +675,10 @@
 
         # check if mail is possible and set flag:
         self.mail_enabled = (self.mail_smarthost is not None or self.mail_sendmail is not None) and self.mail_from
-        
+
         # check if jabber bot is available and set flag:
         self.jabber_enabled = self.notification_bot_uri is not None
-        
+
         # if we are to use the jabber bot, instantiate a server object for future use
         if self.jabber_enabled:
             from xmlrpclib import Server
@@ -741,7 +741,7 @@
 
     def _config_check(self):
         """ Check namespace and warn about unknown names
-        
+
         Warn about names which are not used by DefaultConfig, except
         modules, classes, _private or __magic__ names.
 
@@ -763,13 +763,13 @@
 
     def _decode(self):
         """ Try to decode certain names, ignore unicode values
-        
-        Try to decode str using utf-8. If the decode fail, raise FatalError. 
+
+        Try to decode str using utf-8. If the decode fail, raise FatalError.
 
         Certain config variables should contain unicode values, and
         should be defined with u'text' syntax. Python decode these if
         the file have a 'coding' line.
-        
+
         This will allow utf-8 users to use simple strings using, without
         using u'string'. Other users will have to use u'string' for
         these names, because we don't know what is the charset of the
@@ -865,7 +865,7 @@
                     plugin_parent_dir = os.path.abspath(os.path.join(self.plugin_dir, '..'))
                     fp, path, info = imp.find_module('plugin', [plugin_parent_dir])
                     try:
-                        # Load the module and set in sys.modules             
+                        # Load the module and set in sys.modules
                         module = imp.load_module(name, fp, path, info)
                         sys.modules[self.siteid].plugin = module
                     finally:
@@ -902,6 +902,6 @@
         """ Make it possible to access a config object like a dict """
         return getattr(self, item)
 
-# remove the gettext pseudo function 
+# remove the gettext pseudo function
 del _
 
--- a/MoinMoin/conftest.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/conftest.py	Mon Jul 02 23:33:20 2007 +0200
@@ -87,14 +87,14 @@
 
 class TestConfig:
     """ Custom configuration for unit tests
-    
+
     Some tests assume a specific configuration, and will fail if the wiki admin
-    changed the configuration. For example, DateTime macro test assume 
+    changed the configuration. For example, DateTime macro test assume
     the default datetime_fmt.
-    
+
     When you set custom values in a TestConfig, the previous values are saved,
     and when the TestConfig is called specifically, they are restored automatically.
-    
+
     Typical Usage
     -------------
     ::
@@ -108,7 +108,7 @@
     """
 
     def __init__(self, request):
-        """ Create temporary configuration for a test 
+        """ Create temporary configuration for a test
 
         @param request: current request
         """
@@ -117,7 +117,7 @@
         self.new = []  # New added attributes
 
     def __call__(self, defaults=(), **custom):
-        """ Initialise a temporary configuration for a test 
+        """ Initialise a temporary configuration for a test
 
         @param defaults: list of keys that should use the default value
         @param custom: other keys using non default values, or new keys
@@ -130,7 +130,7 @@
 
     def setDefaults(self, defaults=()):
         """ Set default values for keys in defaults list
-        
+
         Non existing default will raise an AttributeError.
         """
         from MoinMoin.config import multiconfig
@@ -151,8 +151,8 @@
         setattr(self.request.cfg, key, value)
 
     def restore(self):
-        """ Restore previous request.cfg 
-        
+        """ Restore previous request.cfg
+
         Set old keys to old values and delete new keys.
         """
         for key, value in self.old.items():
--- a/MoinMoin/converter/_tests/test_text_html_text_moin_wiki.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/converter/_tests/test_text_html_text_moin_wiki.py	Mon Jul 02 23:33:20 2007 +0200
@@ -26,7 +26,7 @@
 
     def setUp(self):
         self.cfg = self.TestConfig(bang_meta=True)
-        
+
     def tearDown(self):
         del self.cfg
 
@@ -56,11 +56,11 @@
     def __init__(self, request):
         self.request = request
         self.clock = Clock()
-        
+
         # This is broken - tests that need correct content_lang will fail
         self.content_lang = None
         self.current_lang = None
-        
+
         self.form = {}
         self._page_headings = {}
         self.result = []
@@ -223,7 +223,7 @@
     def testListSuccess07(self):
         test = ur"""
  * test
-  
+
  * test
 
 """
@@ -242,7 +242,7 @@
     def testListSuccess08(self):
         test = ur"""
  1. test
-  
+
  1. test
 
 """
@@ -261,7 +261,7 @@
     def testListSuccess09(self):
         test = ur"""
  test:: test
-  
+
  test:: test
 
 """
@@ -732,7 +732,7 @@
 """
         output = ur"""
 <ul>
-<li><p>test 
+<li><p>test
 </p>
 <pre>
 test
--- a/MoinMoin/converter/text_html_text_moin_wiki.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/converter/text_html_text_moin_wiki.py	Mon Jul 02 23:33:20 2007 +0200
@@ -632,7 +632,7 @@
                     before, indent, markup = self._get_list_item_markup(node, i)
                     self.text.extend([before, indent, markup])
                     self.process_list_item(i, indent)
-                elif name in ('ol', 'ul',):
+                elif name in ('ol', 'ul', ):
                     self.process_list(i)
                 elif name == 'dl':
                     self.process_dl(i)
@@ -663,7 +663,7 @@
         for i in node.childNodes:
             name = i.localName
 
-            if name in ('p', 'pre', 'ol', 'ul', 'dl', 'table',) and pending:
+            if name in ('p', 'pre', 'ol', 'ul', 'dl', 'table', ) and pending:
                 self.empty_paragraph_queue(pending, indent, need_indent)
                 need_indent = True
 
@@ -678,7 +678,7 @@
                     self.text.append(indent)
                 self.process_preformatted_item(i)
                 found = True
-            elif name in ('ol', 'ul',):
+            elif name in ('ol', 'ul', ):
                 self.process_list(i)
                 found = True
             elif name == 'dl':
@@ -715,9 +715,9 @@
                     self.text.append(self.new_line)
                     self.text.append(" " * self.depth)
                     self.process_pre(i)
-                elif name in ('h1', 'h2', 'h3', 'h4', 'h5', 'h6',):
+                elif name in ('h1', 'h2', 'h3', 'h4', 'h5', 'h6', ):
                     self.process_heading(i)
-                elif name in ('ol', 'ul',):
+                elif name in ('ol', 'ul', ):
                     self.process_list(i)
                 elif name == 'dl':
                     self.process_dl(i)
@@ -747,7 +747,7 @@
         if name is None:
             return
 
-        if name in ('h1', 'h2', 'h3', 'h4', 'h5', 'h6',): # headers are not allowed here (e.g. inside a ul li),
+        if name in ('h1', 'h2', 'h3', 'h4', 'h5', 'h6', ): # headers are not allowed here (e.g. inside a ul li),
             text = self.node_list_text_only(node.childNodes).strip() # but can be inserted via the editor
             self.text.append(text)                          # so we just drop the header markup and keep the text
             return
@@ -758,9 +758,9 @@
             return
 
         command_close = None
-        if name in ('em', 'i',):
+        if name in ('em', 'i', ):
             command = "''"
-        elif name in ('strong', 'b',):
+        elif name in ('strong', 'b', ):
             command = "'''"
         elif name == 'u':
             command = "__"
@@ -993,7 +993,7 @@
                 elif name == 'caption':
                     self.process_caption(node, i, style)
                     style = ''
-                elif name  in ('col', 'colgroup', ):
+                elif name in ('col', 'colgroup', ):
                     pass # we don't support these, but we just ignore them
                 else:
                     raise ConvertError("process_table: Don't support %s element" % name)
--- a/MoinMoin/error.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/error.py	Mon Jul 02 23:33:20 2007 +0200
@@ -16,7 +16,7 @@
 
     Use this class when you raise errors or create sub classes that
     may be used to display non ASCII error message.
-    
+
     Standard errors work safely only with strings using ascii or
     unicode. This class can be used safely with both strings using
     config.charset and unicode.
@@ -24,7 +24,7 @@
     You can init this class with either unicode or string using
     config.charset encoding. On output, the class will convert the string
     to unicode or the unicode to string, using config.charset.
-            
+
     When you want to render an error, use unicode() or str() as needed.
     """
 
@@ -67,12 +67,12 @@
 
         class InternalError(CompositeError):
             ''' Raise for internal errors '''
-        
+
         try:
             # code that might fail...
         except HairyLowLevelError:
             raise InternalError("Sorry, internal error occurred")
-            
+
     When showing a traceback, both InternalError traceback and
     HairyLowLevelError traceback are available.
     """
--- a/MoinMoin/events/__init__.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/events/__init__.py	Mon Jul 02 23:33:20 2007 +0200
@@ -29,34 +29,34 @@
     def __init__(self, request):
         self.request = request
 
-        
+
 class PageEvent(Event):
     """An event related to a page change"""
     def __init__(self, request):
         Event.__init__(self, request)
 
-        
+
 class PageChangedEvent(PageEvent):
-    
+
     description = u"""Page has been modified (edit, creation, deletion)"""
     req_superuser = False
-    
+
     def __init__(self, request, page, comment, trivial):
         PageEvent.__init__(self, request)
         self.page = page
         self.comment = comment
         self.trivial = trivial
 
-        
+
 class PageRenamedEvent(PageEvent):
     pass
 
 
 class PageDeletedEvent(PageEvent):
-    
+
     description = u"""Page has been deleted"""
     req_superuser = False
-    
+
     def __init__(self, request, page, comment):
         PageEvent.__init__(self, request)
         self.request = request
@@ -65,10 +65,10 @@
 
 
 class FileAttachedEvent(PageEvent):
-    
+
     description = u"""A new attachment has been added"""
     req_superuser = False
-    
+
     def __init__(self, request, pagename, attachment_name, size):
         PageEvent.__init__(self, request)
         self.request = request
@@ -78,64 +78,64 @@
 
 
 class PageRevertedEvent(PageEvent):
-    
+
     description = u"""A page has been reverted to a previous state"""
     req_superuser = False
-    
+
     def __init__(self, request, pagename, previous, current):
         PageEvent.__init__(self, request)
         self.pagename = pagename
         self.previous = previous
-        self.current = current    
+        self.current = current
 
 
 class SubscribedToPageEvent(PageEvent):
-    
+
     description = u"""An user has subscribed to a page"""
     req_superuser = True
-    
+
     def __init__(self, request, pagename, username):
-        PageEvent.__init__(self, request)    
+        PageEvent.__init__(self, request)
         self.pagename = pagename
         self.username = username
 
 
 class JabberIDSetEvent(Event):
     """ Sent when user changes her Jabber ID """
-    
+
     def __init__(self, request, jid):
         Event.__init__(self, request)
         self.jid = jid
-        
+
 class JabberIDUnsetEvent(Event):
     """ Sent when Jabber ID is no longer used
-    
+
     Obviously this will be usually sent along with JabberIDSetEvent,
     because we require user's jabber id to be unique by default.
-    
+
     """
     def __init__(self, request, jid):
         Event.__init__(self, request)
         self.jid = jid
-        
+
 class UserCreatedEvent(Event):
     """ Sent when a new user has been created """
-    
+
     description = u"""A new account has been created"""
     req_superuser = True
-    
+
     def __init__(self, request, user):
         Event.__init__(self, request)
         self.user = user
-        
+
 def _register_handlers(cfg):
     """Create a list of available event handlers.
-    
+
     Each handler is a handle() function defined in an plugin,
     pretty much like in case of actions.
-    
+
     TODO: maybe make it less dumb? ;-)"""
-    
+
     global _event_handlers
 
     _event_handlers = []
@@ -146,44 +146,44 @@
             handler = wikiutil.importPlugin(cfg, "events", name, "handle")
         except PluginAttributeError:
             handler = None
-        
+
         if handler is not None:
             _event_handlers.append(handler)
 
 
 def send_event(event):
     """Function called from outside to process an event"""
-   
+
     # A list of messages generated by event handlers, passed back to caller
     msg = []
-    
+
     # Find all available event handlers
     if _event_handlers is None:
         _register_handlers(event.request.cfg)
-    
+
     # Try to handle the event with each available handler (for now)
     for handle in _event_handlers:
         retval = handle(event)
         if isinstance(retval, unicode):
             msg.append(retval)
-            
+
     return msg
 
 def get_subscribable_events():
     """Create and return a list of user-visible events
-    
+
     @return: A list of user-visible events described by dictionaries
     @rtype: dict
     """
     global _subscribable_events
     defs = globals()
-    
+
     if not _subscribable_events:
         _subscribable_events = {}
-        
+
         for ev in defs.values():
             if type(ev) is type and issubclass(ev, Event) and ev.__dict__.has_key("description"):
                 _subscribable_events[ev.__name__] = {'desc': ev.description,
                                                      'superuser': ev.req_superuser}
-    
+
     return _subscribable_events
--- a/MoinMoin/events/emailnotify.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/events/emailnotify.py	Mon Jul 02 23:33:20 2007 +0200
@@ -28,7 +28,7 @@
     @return: sendmail result
     """
     _ = request.getText
-    mailBody = page_change_message("page_changed", request, page, email_lang, 
+    mailBody = page_change_message("page_changed", request, page, email_lang,
                                    comment=comment, revisions=revisions)
 
     return sendmail.sendmail(request, emails,
@@ -51,7 +51,7 @@
     """
     _ = request.getText
     subscribers = page.getSubscribers(request, return_users=1, trivial=trivial)
-    
+
     if subscribers:
         # get a list of old revisions, and append a diff
         revisions = page.getRevList()
@@ -80,5 +80,5 @@
 
     if not event.request.cfg.mail_enabled:
         return
-    
+
     return notify_subscribers(event.request, event.page, event.comment, event.trivial)
--- a/MoinMoin/events/jabbernotify.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/events/jabbernotify.py	Mon Jul 02 23:33:20 2007 +0200
@@ -23,7 +23,7 @@
     # Check for desired event type and if notification bot is configured
     if not cfg.jabber_enabled:
         return
-    
+
     if isinstance(event, ev.PageChangedEvent):
         return handle_page_changed(event)
     elif isinstance(event, ev.JabberIDSetEvent) or isinstance(event, ev.JabberIDUnsetEvent):
@@ -34,21 +34,21 @@
         return handle_page_deleted(event)
     elif isinstance(event, ev.UserCreatedEvent):
         return handle_user_created(event)
-    
+
 
 def handle_jid_changed(event):
     """ Handles events sent when user's JID changes """
-    
+
     request = event.request
     server = request.cfg.notification_server
     _ = request.getText
-    
+
     try:
         if isinstance(event, ev.JabberIDSetEvent):
             server.addJIDToRoster(request.cfg.secret, event.jid)
         else:
-            server.removeJIDFromRoster(request.cfg.secret, event.jid)        
-                
+            server.removeJIDFromRoster(request.cfg.secret, event.jid)
+
     except xmlrpclib.Error, err:
         print _("XML RPC error: "), str(err)
         return (0, _("Notifications not sent"))
@@ -59,66 +59,66 @@
 
 def _filter_subscriber_list(event, subscribers):
     """Filter a list of page subscribers to honor event subscriptions
-    
+
     @param subscribers: list of subscribers (dict of lists, language is the key)
     @type subscribers: dict
-    
+
     """
     event_name = event.__class__.__name__
-    
+
     # Filter the list by removing users who don't want to receive
     # notifications about this type of event
     for lang in subscribers.keys():
         userlist = []
-        
+
         for usr in subscribers[lang]:
             if event_name in usr.subscribed_events:
                 userlist.append(usr)
-                
+
         subscribers[lang] = userlist
 
 def handle_file_attached(event):
     """Handles event sent when a file is attached to a page"""
-    
+
     request = event.request
     server = request.cfg.notification_server
     page = Page(request, event.pagename)
-    
+
     subscribers = page.getSubscribers(request, return_users=1)
     _filter_subscriber_list(event, subscribers)
-    
+
     page_change("attachment_added", request, page, subscribers, attach_name=event.attachment_name, attach_size=event.size)
 
-        
+
 def handle_page_changed(event):
     """ Handles events related to page changes """
-    
+
     request = event.request
     server = request.cfg.notification_server
     page = event.page
-    
-    subscribers = page.getSubscribers(request, return_users=1, trivial=event.trivial)    
+
+    subscribers = page.getSubscribers(request, return_users=1, trivial=event.trivial)
     _filter_subscriber_list(event, subscribers)
 
     page_change("page_changed", request, page, subscribers, revisions=page.getRevList(), comment=event.comment)
-    
+
 
 def handle_page_deleted(event):
     """Handles event sent when a page is deleted"""
-    
+
     request = event.request
     server = request.cfg.notification_server
     page = event.page
-    
+
     subscribers = page.getSubscribers(request, return_users=1)
     _filter_subscriber_list(event, subscribers)
-    
+
     page_change("page_deleted", request, page, subscribers)
 
 
 def handle_user_created(event):
     """Handles an event sent when a new user is being created"""
-    
+
     user_ids = getUserList(event.request)
     jids = []
     event_name = event.__class__.__name__
@@ -128,22 +128,22 @@
     """
 
     email = event.user.email or u"NOT SET"
-    
+
     for id in user_ids:
         usr = User(event.request, id=id)
-        
+
         # Currently send this only to super users
         # TODO: make it possible to disable this notification
         if usr.isSuperUser() and usr.jid and event_name in usr.subscribed_events:
             jids.append(usr.jid)
-            
+
     send_notification(event.request, jids, msg % (event.user.name, email))
-    
+
 
 def page_change(type, request, page, subscribers, **kwargs):
-    
+
     _ = request.getText
-    
+
     if subscribers:
         # send notifications to all subscribers
         results = [_('Status of sending notifications:')]
@@ -174,9 +174,9 @@
     """
     _ = request.getText
     server = request.cfg.notification_server
-    
+
     for jid in jids:
-                
+
         # FIXME: stops sending notifications on first error
         try:
             server.send_notification(request.cfg.secret, jid, message)
@@ -186,5 +186,5 @@
         except Exception, err:
             print _("Low-level communication error: "), str(err)
             return (0, _("Notifications not sent"))
-        
+
     return (1, _("Notifications sent OK"))
--- a/MoinMoin/events/messages.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/events/messages.py	Mon Jul 02 23:33:20 2007 +0200
@@ -18,33 +18,33 @@
 
 def page_change_message(msgtype, request, page, lang, **kwargs):
     """Prepare a notification text for a page change of given type
-    
+
     @param msgtype: a type of message to send (page_changed, attachment_added, ...)
     @type msgtype: str or unicode
     @param **kwargs: a dictionary of additional parameters, which depend on msgtype
-    
+
     @return: a formatted, ready to send message
     @rtype: unicode
-    
+
     """
-    
+
     _ = request.getText
     page._ = lambda s, formatted=True, r=request, l=lang: r.getText(s, formatted=formatted, lang=l)
     querystr = {}
-    
-    if msgtype == "page_changed": 
+
+    if msgtype == "page_changed":
         revisions = kwargs['revisions']
         if len(kwargs['revisions']) >= 2:
             querystr = {'action': 'diff',
                     'rev2': str(revisions[0]),
                     'rev1': str(revisions[1])}
-        
+
     if msgtype == "attachment_added":
         attachlink = request.getBaseURL() + \
                         getAttachUrl(page.page_name, kwargs['attach_name'], request)
-        
+
     pagelink = request.getQualifiedURL(page.url(request, querystr, relative=False))
-    
+
     if msgtype == "page_changed":
         messageBody = _("Dear Wiki user,\n\n"
         'You have subscribed to a wiki page or wiki category on "%(sitename)s" for change notification.\n\n'
@@ -54,7 +54,7 @@
             'pagelink': pagelink,
             'sitename': page.cfg.sitename or request.getBaseURL(),
         }
-            
+
         # append a diff (or append full page text if there is no diff)
         if len(revisions) < 2:
             messageBody = messageBody + \
@@ -67,7 +67,7 @@
                 messageBody = messageBody + "%s\n%s\n" % (("-" * 78), '\n'.join(lines))
             else:
                 messageBody = messageBody + _("No differences found!\n", formatted=False)
-                
+
     elif msgtype == "attachment_added":
         messageBody = _("Dear Wiki user,\n\n"
         'You have subscribed to a wiki page "%(sitename)s" for change notification.\n\n'
@@ -83,7 +83,7 @@
             'attach_size': kwargs['attach_size'],
             'attach_get': attachlink,
         }
-        
+
     elif msgtype == "page_deleted":
         messageBody = _("Dear wiki user,\n\n"
             'You have subscribed to a wiki page "%(sitename)s" for change notification.\n\n'
@@ -95,10 +95,10 @@
         }
     else:
         raise UnknownChangeType()
-    
+
     if 'comment' in kwargs and kwargs['comment'] is not None:
         messageBody = messageBody + \
             _("The comment on the change is:\n%(comment)s", formatted=False) % {'comment': kwargs['comment']}
-            
+
     return messageBody
-    
+
--- a/MoinMoin/events/wikidictsrescan.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/events/wikidictsrescan.py	Mon Jul 02 23:33:20 2007 +0200
@@ -19,16 +19,16 @@
         if cfg.cache.page_dict_regex.search(pagename) or \
            cfg.cache.page_group_regex.search(pagename):
             return handle_groupsdicts_changed(event)
-    
+
 
 def handle_groupsdicts_changed(event):
     """ Handles events related to groups and dicts page changes:
         Scans all pages matching the dict / group regex and pickles the
         data to disk.
-    """    
+    """
     request = event.request
     page = event.page
-    
+
     logging.debug("groupsdicts changed: %r, scan_dicts started", page.page_name)
     gd = wikidicts.GroupDict(request)
     gd.scan_dicts()
--- a/MoinMoin/failure.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/failure.py	Mon Jul 02 23:33:20 2007 +0200
@@ -13,16 +13,16 @@
 
 class View(cgitb.View):
     """ Display an error message and debugging information
-    
+
     Additions to cgitb.View:
      - Multiple tracebacks support
      - Debugging information is shown only in debug mode
      - Moin application information
      - General help text and links
      - Handle multiple paragraphs in exception message
-     
+
     cgitb is heavily modified cgitb, but fully backward compatible with
-    the standard cgitb. It should not contain any moin specific code.  
+    the standard cgitb. It should not contain any moin specific code.
 
     cgitb was refactored to be easy to customize by applications
     developers. This moin specific subclass is an example.
@@ -54,7 +54,7 @@
 
     def stylesheet(self):
         return cgitb.View.stylesheet(self) + """
-.cgitb .buttons {margin: 0.5em 0; padding: 5px 10px;}        
+.cgitb .buttons {margin: 0.5em 0; padding: 5px 10px;}
 .cgitb .buttons li {display: inline; margin: 0; padding: 0 0.25em;}
 """
 
@@ -133,7 +133,7 @@
 
 def handle(request, err):
     """ Handle failures
-    
+
     Display fancy error view, or fallback to simple text traceback
     """
     if 'MOIN_DEBUG' in os.environ:
@@ -158,7 +158,7 @@
 
 def printTextException(request, info=None):
     """ Simple text exception that should never fail
-    
+
     Print all exceptions in a composite error.
     """
     import traceback
--- a/MoinMoin/filter/EXIF.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/filter/EXIF.py	Mon Jul 02 23:33:20 2007 +0200
@@ -88,7 +88,7 @@
 # 15-FEB-04 CEC Finally fixed bit shift warning by converting Y to 0L.
 #
 #############
-# 2006-08-04 MoinMoin:ReimarBauer added an optional parameter name to process_file and dump_IFD. Using this parameter the 
+# 2006-08-04 MoinMoin:ReimarBauer added an optional parameter name to process_file and dump_IFD. Using this parameter the
 #            loop is breaked after that tag_name is processed.
 #            Example:
 #                    f = open(infile, 'rb')
@@ -261,7 +261,7 @@
              {3: 'Digital Camera'}),
     0xA301: ('SceneType',
              {1: 'Directly Photographed'}),
-    0xA302: ('CVAPattern',),
+    0xA302: ('CVAPattern', ),
     }
 
 # interoperability tags
--- a/MoinMoin/filter/application_msword.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/filter/application_msword.py	Mon Jul 02 23:33:20 2007 +0200
@@ -3,7 +3,7 @@
     MoinMoin - msword filter
 
     Depends on: antiword command from antiword package
-    
+
     @copyright: 2006 MoinMoin:ThomasWaldmann
     @license: GNU GPL, see COPYING for details.
 """
--- a/MoinMoin/filter/application_octet_stream.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/filter/application_octet_stream.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,17 +1,17 @@
 # -*- coding: iso-8859-1 -*-
 """
     MoinMoin - binary file Filter
-    
+
     Processes any binary file and extracts ASCII content from it.
-    
+
     We ignore any file with a file extension on the blacklist, because
     we either can't handle it or it usually has no indexable content.
-    
+
     Due to speed reasons, we only read the first maxread bytes from a file.
-    
+
     For reducing the amount of trash, we only return words with
     length >= minwordlen.
-    
+
     Depends on: nothing (pure python)
 
     @copyright: 2006 MoinMoin:ThomasWaldmann
--- a/MoinMoin/filter/application_pdf.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/filter/application_pdf.py	Mon Jul 02 23:33:20 2007 +0200
@@ -3,7 +3,7 @@
     MoinMoin - PDF filter
 
     Depends on: pdftotext command from xpdf-utils package
-    
+
     @copyright: 2006 MoinMoin:ThomasWaldmann
     @license: GNU GPL, see COPYING for details.
 """
--- a/MoinMoin/filter/application_vnd_ms_excel.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/filter/application_vnd_ms_excel.py	Mon Jul 02 23:33:20 2007 +0200
@@ -3,7 +3,7 @@
     MoinMoin - msexcel filter
 
     Depends on: "xls2csv" command from "catdoc" package
-    
+
     @copyright: 2006 MoinMoin:ThomasWaldmann
     @license: GNU GPL, see COPYING for details.
 """
--- a/MoinMoin/filter/audio.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/filter/audio.py	Mon Jul 02 23:33:20 2007 +0200
@@ -8,7 +8,7 @@
 
 def execute(indexobj, filename):
     """ Audio data filtering not implemented yet.
-    
+
         TODO: maybe extract title, artist, etc. from mp3 and ogg
     """
     return u""
--- a/MoinMoin/filter/image.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/filter/image.py	Mon Jul 02 23:33:20 2007 +0200
@@ -8,7 +8,7 @@
 
 def execute(indexobj, filename):
     """ Image data filtering not implemented yet.
-    
+
         TODO: maybe extract comments or time stamps from jpegs and png.
     """
     return u""
--- a/MoinMoin/filter/text_rtf.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/filter/text_rtf.py	Mon Jul 02 23:33:20 2007 +0200
@@ -3,7 +3,7 @@
     MoinMoin - RichTextFormat filter
 
     Depends on: catdoc command from catdoc package
-    
+
     @copyright: 2006 MoinMoin:ThomasWaldmann
     @license: GNU GPL, see COPYING for details.
 """
--- a/MoinMoin/filter/video.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/filter/video.py	Mon Jul 02 23:33:20 2007 +0200
@@ -8,7 +8,7 @@
 
 def execute(indexobj, filename):
     """ Video data filtering not implemented yet.
-    
+
         TODO: maybe extract some meta information from some popular video formats.
     """
     return u""
--- a/MoinMoin/formatter/__init__.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/formatter/__init__.py	Mon Jul 02 23:33:20 2007 +0200
@@ -171,7 +171,7 @@
     def nowikiword(self, text):
         return self.text(text)
 
-    # Text and Text Attributes ########################################### 
+    # Text and Text Attributes ###########################################
 
     def text(self, text, **kw):
         if not self._highlight_re:
--- a/MoinMoin/formatter/text_docbook.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/formatter/text_docbook.py	Mon Jul 02 23:33:20 2007 +0200
@@ -5,7 +5,7 @@
     @copyright: 2005 by Mikko Virkkil <mvirkkil@cc.hut.fi>
     @copyright: 2005 by MoinMoin:AlexanderSchremmer (small modifications)
     @copyright: 2005 by MoinMoin:Petr Pytelka <pyta@lightcomp.com> (small modifications)
-    
+
     @license: GNU GPL, see COPYING for details.
 """
 
@@ -198,7 +198,7 @@
             self.text('\\n')
         else:
             #this should not happen
-            #self.text('CRAP') 
+            #self.text('CRAP')
             pass
         return ""
 
@@ -263,7 +263,7 @@
 ### Inline ##########################################################
 
     def _handleFormatting(self, name, on, attributes=()):
-        # We add all the elements we create to the list of elements that should not contain a section        
+        # We add all the elements we create to the list of elements that should not contain a section
         if name not in self.section_should_break:
             self.section_should_break.append(name)
 
@@ -540,20 +540,20 @@
         return '' # No clue why something should be done here
 
     def code_token(self, on, tok_type):
-        toks_map = {'ID':'methodname',
-                    'Operator':'',
-                    'Char':'',
-                    'Comment':'lineannotation',
-                    'Number':'',
-                    'String':'phrase',
-                    'SPChar':'',
-                    'ResWord':'token',
-                    'ConsWord':'symbol',
-                    'Error':'errortext',
-                    'ResWord2':'',
-                    'Special':'',
-                    'Preprc':'',
-                    'Text':''}
+        toks_map = {'ID': 'methodname',
+                    'Operator': '',
+                    'Char': '',
+                    'Comment': 'lineannotation',
+                    'Number': '',
+                    'String': 'phrase',
+                    'SPChar': '',
+                    'ResWord': 'token',
+                    'ConsWord': 'symbol',
+                    'Error': 'errortext',
+                    'ResWord2': '',
+                    'Special': '',
+                    'Preprc': '',
+                    'Text': ''}
         if toks_map.has_key(tok_type) and toks_map[tok_type] != '':
             return self._handleFormatting(toks_map[tok_type], on)
         else:
--- a/MoinMoin/formatter/text_html.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/formatter/text_html.py	Mon Jul 02 23:33:20 2007 +0200
@@ -252,7 +252,7 @@
 
         Setting a value to None rather than a string (or string
         coercible) will remove that attribute from the list.
-        
+
         If the list of allowed_attrs is provided, then an error is
         raised if an HTML attribute is encountered that is not in that
         list (or is not a common attribute which is always allowed or
@@ -326,7 +326,7 @@
 
     def _open(self, tag, newline=False, attr=None, allowed_attrs=None, **kw):
         """ Open a tag with optional attributes (INTERNAL USE BY HTML FORMATTER ONLY!)
-        
+
         @param tag: html tag, string
         @param newline: render tag so following data is on a separate line
         @param attr: dict with tag attributes
@@ -396,7 +396,7 @@
             result.append('</%s>' % (tag))
             tagstr = ''.join(result)
         else:
-            # Inline elements 
+            # Inline elements
             # Pull from stack, ignore order, that is not our problem.
             # The code that calls us should keep correct calling order.
             if tag in self._inlineStack:
@@ -425,7 +425,7 @@
 
         # Setup id
         if content_id != 'content':
-            aid = 'top_%s' % (content_id,)
+            aid = 'top_%s' % (content_id, )
         else:
             aid = 'top'
         self._content_ids.append(content_id)
@@ -454,7 +454,7 @@
         except:
             cid = 'content'
         if cid != 'content':
-            aid = 'bottom_%s' % (cid,)
+            aid = 'bottom_%s' % (cid, )
         else:
             aid = 'bottom'
 
@@ -465,9 +465,9 @@
 
     def lang(self, on, lang_name):
         """ Insert text with specific lang and direction.
-        
+
             Enclose within span tag if lang_name is different from
-            the current lang    
+            the current lang
         """
         tag = 'span'
         if lang_name != self.request.current_lang:
@@ -715,7 +715,7 @@
                 # add alt and title tags to areas
                 map = re.sub('href\s*=\s*"((?!%TWIKIDRAW%).+?)"', r'href="\1" alt="\1" title="\1"', map)
                 # add in edit links plus alt and title attributes
-                alt = title =  _('Edit drawing %(filename)s (opens in new window)') % {'filename': self.text(fname)}
+                alt = title = _('Edit drawing %(filename)s (opens in new window)') % {'filename': self.text(fname)}
                 map = map.replace('%TWIKIDRAW%"', '%s" alt="%s" title="%s"' % (edit_link, alt, title))
                 # unxml, because 4.01 concrete will not validate />
                 map = map.replace('/>', '>')
@@ -726,7 +726,7 @@
                     src=AttachFile.getAttachUrl(pagename, filename, self.request, addts=1),
                     usemap='#'+mapid, css="drawing"))
         else:
-            alt = title =  _('Edit drawing %(filename)s (opens in new window)') % {'filename': self.text(fname)}
+            alt = title = _('Edit drawing %(filename)s (opens in new window)') % {'filename': self.text(fname)}
             return wikiutil.link_tag(self.request,
                                      edit_link,
                                      self.image(alt=alt,
@@ -1025,7 +1025,7 @@
 
     def linebreak(self, preformatted=1):
         """Creates a line break in the HTML output.
-        
+
         If preformatted is true a <br> element is inserted, otherwise
         the linebreak will only be visible in the HTML source.
         """
@@ -1035,7 +1035,7 @@
 
     def paragraph(self, on, **kw):
         """Creates a paragraph with a <p> element.
-        
+
         Call once with on=1 to start the region, and a second time
         with on=0 to end it.
         """
--- a/MoinMoin/formatter/text_plain.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/formatter/text_plain.py	Mon Jul 02 23:33:20 2007 +0200
@@ -129,7 +129,7 @@
             if self._in_list > 0:
                 self._in_list += 1
                 self._did_para = 1
-                return ' %d. ' % (self._in_list-1,)
+                return ' %d. ' % (self._in_list-1, )
             elif self._in_list < 0:
                 self._did_para = 1
                 return u' * '
--- a/MoinMoin/formatter/text_xml.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/formatter/text_xml.py	Mon Jul 02 23:33:20 2007 +0200
@@ -71,7 +71,7 @@
         return '<attachment href="%s">%s</attachment>' % (url, text)
 
     def attachment_image(self, url, **kw):
-        return '<attachmentimage href="%s"></attachmentimage>' % (url,)
+        return '<attachmentimage href="%s"></attachmentimage>' % (url, )
 
     def attachment_drawing(self, url, text, **kw):
         return '<attachmentdrawing href="%s">%s</attachmentdrawing>' % (url, text)
@@ -82,14 +82,14 @@
         return self._escape(text)
 
     def rule(self, size=0, **kw):
-        return "\n<br/>%s<br/>\n" % ("-" * 78,) # <hr/> not supported in stylebook
+        return "\n<br/>%s<br/>\n" % ("-" * 78, ) # <hr/> not supported in stylebook
 #        if size:
-#            return '<hr size="%d"/>\n' % (size,)
+#            return '<hr size="%d"/>\n' % (size, )
 #        else:
 #            return '<hr/>\n'
 
     def icon(self, type):
-        return '<icon type="%s" />' % type            
+        return '<icon type="%s" />' % type
 
     def strong(self, on, **kw):
         return ['<strong>', '</strong>'][not on]
--- a/MoinMoin/i18n/__init__.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/i18n/__init__.py	Mon Jul 02 23:33:20 2007 +0200
@@ -16,7 +16,7 @@
         browserLanguages() -- return the browser accepted languages
         getDirection(lang) -- return the lang direction either 'ltr' or 'rtl'
         getText(str, request) -- return str translation
-    
+
     TODO: as soon as we have some "farm / server plugin dir", extend this to
           load translations from there, too.
 
@@ -41,7 +41,7 @@
 
 def po_filename(request, language, domain):
     """ we use MoinMoin/i18n/<language>[.<domain>].mo as filename for the PO file.
-    
+
         TODO: later, when we have a farm scope plugin dir, we can also load
               language data from there.
     """
@@ -256,16 +256,16 @@
 
 
 def requestLanguage(request, try_user=True):
-    """ 
+    """
     Return the user interface language for this request.
-    
+
     The user interface language is taken from the user preferences for
     registered users, or request environment, or the default language of
     the wiki, or English.
 
     This should be called once per request, then you should get the value from
     request object lang attribute.
-    
+
     Unclear what this means: "Until the code for get
     text is fixed, we are caching the request language locally."
 
@@ -306,7 +306,7 @@
 def browserLanguages(request):
     """
     Return the accepted languages as set in the user browser.
-    
+
     Parse the HTTP headers and extract the accepted languages, according to:
     http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4
 
--- a/MoinMoin/i18n/dummy.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/i18n/dummy.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,6 +1,6 @@
 """
     This is a dummy file to feed some stuff into gettext system
-    that it would not get otherwise - for automatic generation 
+    that it would not get otherwise - for automatic generation
     of the translation files.
 
 """
--- a/MoinMoin/i18n/msgfmt.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/i18n/msgfmt.py	Mon Jul 02 23:33:20 2007 +0200
@@ -116,7 +116,7 @@
             # terminated; the NUL does not count into the size.
             offsets.append((len(ids), len(id), len(strs), len(self.messages[id])))
             ids += id + '\0'
-            strs += self.messages[id] +  '\0'
+            strs += self.messages[id] + '\0'
         output = []
         # The header is 7 32-bit unsigned integers.  We don't use hash tables, so
         # the keys start right after the index tables.
--- a/MoinMoin/i18n/tools/check_i18n.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/i18n/tools/check_i18n.py	Mon Jul 02 23:33:20 2007 +0200
@@ -39,7 +39,7 @@
 
 class TextFinder:
     """ Walk through AST tree and collect text from gettext calls
-        
+
     Find all calls to gettext function in the source tree and collect
     the texts in a dict. Use compiler to create an abstract syntax tree
     from each source file, then find the nodes for gettext function
@@ -52,7 +52,7 @@
 
     Note that TextFinder will only retrieve text from function calls
     with a constant argument like _('text'). Calls like _('text' % locals()),
-    _('text 1' + 'text 2') are marked as bad call in the report, and the 
+    _('text 1' + 'text 2') are marked as bad call in the report, and the
     text is not retrieved into the dictionary.
 
     Note also that texts in source can appear several times in the same
@@ -62,18 +62,18 @@
     The dictionary value for each text is a dictionary of filenames each
     containing a list of (best guess) lines numbers containning the text.
     """
-    
+
     def __init__(self, name='_'):
         """ Init with the gettext function name or '_'"""
         self._name = name       # getText function name
         self._dictionary = {}   # Unique texts in the found texts
         self._found = 0         # All good calls including duplicates
         self._bad = 0           # Bad calls: _('%s' % var) or _('a' + 'b')
-    
+
     def setFilename(self, filename):
         """Remember the filename we are parsing"""
-        self._filename = filename 
-        
+        self._filename = filename
+
     def visitModule(self, node):
         """ Start the search from the top node of a module
 
@@ -83,7 +83,7 @@
         This is the place to initialize module specific data.
         """
         self._visited = {}  # init node cache - we will visit each node once
-        self._lineno = 'NA' # init line number  
+        self._lineno = 'NA' # init line number
 
         # Start walking in the module node
         self.walk(node)
@@ -93,9 +93,9 @@
         if node in self._visited:
             # We visited this node already
             return
-            
-        self._visited[node] = 1            
-        if not self.parseNode(node):           
+
+        self._visited[node] = 1
+        if not self.parseNode(node):
             for child in node.getChildNodes():
                 self.walk(child)
 
@@ -107,12 +107,12 @@
         if node.lineno is not None:
             self._lineno = node.lineno
 
-        if node.__class__ == CallFunc and node.args: 
+        if node.__class__ == CallFunc and node.args:
             child = node.node
-            klass = child.__class__            
+            klass = child.__class__
             if (# Standard call _('text')
                 (klass == Name and child.name == self._name) or
-                # A call to an object attribute: object._('text') 
+                # A call to an object attribute: object._('text')
                 (klass == Getattr and child.attrname == self._name)):
                 if node.args[0].__class__ == Const:
                     # Good call with a constant _('text')
@@ -121,10 +121,10 @@
                     self.addBadCall(node)
                 return 1
         return 0
-            
+
     def addText(self, text):
         """ Add text to dictionary and count found texts.
-        
+
         Note that number of texts in dictionary could be different from
         the number of texts found, because some texts appear several
         times in the code.
@@ -136,14 +136,14 @@
         self._lineno is the last line number we checked. It may be the line
         number of the text, or near it.
         """
-        
+
         self._found = self._found + 1
 
         # Create key for this text if needed
         if text not in self._dictionary:
             self._dictionary[text] = {}
 
-        # Create key for this filename if needed   
+        # Create key for this filename if needed
         textInfo = self._dictionary[text]
         if self._filename not in textInfo:
             textInfo[self._filename] = [self._lineno]
@@ -157,18 +157,18 @@
         print "<!> Warning: non-constant _ call:"
         print " `%s`" % str(node)
         print " `%s`:%s" % (self._filename, self._lineno)
-        
+
     # Accessors
-    
+
     def dictionary(self):
         return self._dictionary
-            
+
     def bad(self):
         return self._bad
-        
+
     def found(self):
         return self._found
-        
+
 
 def visit(path, visitor):
     visitor.setFilename(path)
@@ -213,36 +213,34 @@
             if text not in self.__sourceDict:
                 self.__unused[text] = self.__langDict[text]
         self.__ready = 1
-        
+
     def summary(self):
         """Return summary dict"""
         summary = {
             'name': i18n.languages[self.__lang][i18n.ENAME].encode(output_encoding),
             'maintainer': i18n.languages[self.__lang][i18n.MAINTAINER],
-            'total' : len(self.__langDict),
+            'total': len(self.__langDict),
             'missing': len(self.__missing),
             'unused': len(self.__unused),
             'error': self.__error
             }
         return summary
-        
+
     def missing(self):
         return self.__missing
 
     def unused(self):
         return self.__unused
-    
-        
+
 
 if __name__ == '__main__':
+    import time
 
-    import time
-    
     # Check that we run from the root directory where MoinMoin package lives
     # or from the i18n directory when this script lives
     if os.path.exists('MoinMoin/__init__.py'):
         # Running from the root directory
-        MoinMoin_dir = os.curdir   
+        MoinMoin_dir = os.curdir
     elif os.path.exists(os.path.join(os.pardir, 'i18n')):
         # Runing from i18n
         MoinMoin_dir = os.path.join(os.pardir, os.pardir)
@@ -254,10 +252,10 @@
     sys.path.insert(0, MoinMoin_dir)
     from MoinMoin import i18n
     from MoinMoin.util import pysupport
-    
+
     textFinder = TextFinder()
     found = 0
-    unique = 0   
+    unique = 0
     bad = 0
 
     # Find gettext calls in the source
@@ -268,17 +266,17 @@
                 path = os.path.join(root, name)
                 #print '%(path)s:' % locals(),
                 visit(path, textFinder)
-                
+
                 # Report each file's results
                 new_unique = len(textFinder.dictionary()) - unique
                 new_found = textFinder.found() - found
                 #print '%(new_unique)d (of %(new_found)d)' % locals()
-                                
+
                 # Warn about bad calls - these should be fixed!
                 new_bad = textFinder.bad() - bad
                 #if new_bad:
                 #    print '### Warning: %(new_bad)d bad call(s)' % locals()
-                
+
                 unique = unique + new_unique
                 bad = bad + new_bad
                 found = found + new_found
@@ -294,7 +292,7 @@
     print "To recreate this report run `make check-i18n` and paste here"
     print
     print '----'
-    print 
+    print
     print '[[TableOfContents(2)]]'
     print
     print
@@ -310,21 +308,21 @@
     if bad:
         print '\n%(bad)d bad calls.' % locals()
     print
-    
+
     # Check languages from the command line or from moin.i18n against
     # the source
     if sys.argv[1:]:
         languages = sys.argv[1:]
     else:
         languages = i18n.languages.keys()
-        for lang in blacklist_langs: 
+        for lang in blacklist_langs:
             # problems, maybe due to encoding?
             if lang in languages:
                 languages.remove(lang)
     if 'en' in languages:
         languages.remove('en') # there is no en lang file
     languages.sort()
-    
+
     # Create report for all languages
     report = {}
     for lang in languages:
@@ -335,7 +333,7 @@
            "||<:>'''Unused'''||")
     for lang in languages:
         print ("||%(name)s||<)>%(total)s||<)>%(missing)s||<)>%(unused)s||"
-               ) % report[lang].summary() 
+               ) % report[lang].summary()
 
     # Print details
     for lang in languages:
@@ -358,18 +356,18 @@
 """
             for text in report[lang].missing():
                 print " 1. `%r`" % text
-                
+
         # Print unused texts, if any
         if report[lang].unused():
             print """
 === Possibly unused texts ===
 
-Be ''very careful'' and double-check before removing any of these 
+Be ''very careful'' and double-check before removing any of these
 potentially unused items.
 
 This program can't detect references done from wiki pages, from
 UserPreferences options, from Icon titles etc.!
-"""        
+"""
             for text in report[lang].unused():
                 print " 1. `%r`" % text
 
--- a/MoinMoin/i18n/tools/mail_i18n-maintainers.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/i18n/tools/mail_i18n-maintainers.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,9 +1,9 @@
 #!/usr/bin/env python
 """
-    read mail text from standard input and 
+    read mail text from standard input and
     send an email to all i18n maintainers
     %(lang)s will be replaced by language
-    
+
     @copyright: 2004 Thomas Waldmann
     @license: GNU GPL, see COPYING for details
 """
@@ -21,11 +21,11 @@
     """
     Send a mail to the address(es) in 'to', with the given subject and
     mail body 'text'.
-    
+
     Return a tuple of success or error indicator and message.
 
     TODO: code duplicated from MoinMoin/util/mail.py
-    
+
     @param mfrom: source email address
     @param to: target email address
     @param subject: subject of email
@@ -38,14 +38,14 @@
     from email.Header import Header
     from email.Utils import formatdate
     global charset, mail_smarthost, mail_login
-    
+
     # Create a text/plain message
     msg = MIMEText(text, 'plain', charset)
     msg['From'] = mfrom
     msg['To'] = ', '.join(mto)
     msg['Subject'] = Header(subject, charset)
     msg['Date'] = formatdate()
-    
+
     try:
         server = smtplib.SMTP(mail_smarthost)
         try:
@@ -64,7 +64,7 @@
         return (0, str(e))
     except (os.error, socket.error), e:
         return (0, "Connection to mailserver '%(server)s' failed: %(reason)s" % {
-            'server': mail_smarthost, 
+            'server': mail_smarthost,
             'reason': str(e)
         })
 
--- a/MoinMoin/i18n/tools/recode.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/i18n/tools/recode.py	Mon Jul 02 23:33:20 2007 +0200
@@ -37,7 +37,7 @@
 
 def error(msg):
     sys.stderr.write(msg + '\n')
-    
+
 def run():
     try:
         cmd, src_enc, dst_enc = sys.argv
--- a/MoinMoin/logfile/__init__.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/logfile/__init__.py	Mon Jul 02 23:33:20 2007 +0200
@@ -23,13 +23,13 @@
     """
     Reads lines from a file
         self.len      number of lines in self.lines
-        self.lines    list of lines (unicode) 
+        self.lines    list of lines (unicode)
         self.offsets  list of file offsets for each line. additionally the position
                       after the last read line is stored into self.offsets[-1]
     """
     def __init__(self, file, offset, size, forward=True):
         """
-        
+
         TODO: when this gets refactored, don't use "file" (is a builtin)
 
         @param file: open file object
@@ -104,7 +104,7 @@
 
     def reverse(self):
         """ yield log entries in reverse direction starting from last one
-        
+
         @rtype: iterator
         """
         self.to_end()
@@ -118,11 +118,11 @@
 
     def sanityCheck(self):
         """ Check for log file write access.
-        
+
         @rtype: string (error message) or None
         """
         if not os.access(self.__filename, os.W_OK):
-            return "The log '%s' is not writable!" % (self.__filename,)
+            return "The log '%s' is not writable!" % (self.__filename, )
         return None
 
     def __getattr__(self, name):
@@ -142,7 +142,7 @@
             try:
                 # Open the file (NOT using codecs.open, it breaks our offset calculation. We decode it later.).
                 # Use binary mode in order to retain \r - otherwise the offset calculation would fail.
-                self._input = file(self.__filename, "rb",)
+                self._input = file(self.__filename, "rb", )
             except IOError, err:
                 if err.errno == 2: # POSIX errno.ENOENT "file not found"
                     try:
@@ -150,7 +150,7 @@
                         f = file(self.__filename, "ab")
                         f.write('')
                         f.close()
-                        self._input = file(self.__filename, "rb",)
+                        self._input = file(self.__filename, "rb", )
                         return self._input
                     except:
                         pass
@@ -164,9 +164,9 @@
 
     def size(self):
         """ Return log size in bytes
-        
+
         Return 0 if the file does not exists. Raises other OSError.
-        
+
         @return: size of log file in bytes
         @rtype: Int
         """
@@ -179,11 +179,11 @@
 
     def lines(self):
         """ Return number of lines in the log file
-        
+
         Return 0 if the file does not exists. Raises other OSError.
 
         Expensive for big log files - O(n)
-        
+
         @return: size of log file in lines
         @rtype: Int
         """
@@ -219,7 +219,7 @@
         It adjusts .__lineno if set.
         This function is not aware of filters!
 
-        @param lines: number of lines, may be negative to move backward 
+        @param lines: number of lines, may be negative to move backward
         @rtype: boolean
         @return: True if moving more than to the beginning and moving
                  to the end or beyond
@@ -357,7 +357,7 @@
 
     def position(self):
         """ Return the current file position
-        
+
         This can be converted into a String using back-ticks and then be rebuild.
         For this plain file implementation position is an Integer.
         """
@@ -375,7 +375,7 @@
         if self.__buffer2:
             logging.log(self.loglevel, "b2 %r %r" % (self.__buffer2.offsets[0], self.__buffer2.offsets[-1]))
         if self.__buffer1 and self.__buffer1.offsets[0] <= position < self.__buffer1.offsets[-1]:
-            # position is in .__buffer1 
+            # position is in .__buffer1
             self.__rel_index = self.__buffer1.offsets.index(position)
             self.__buffer = self.__buffer1
         elif self.__buffer2 and self.__buffer2.offsets[0] <= position < self.__buffer2.offsets[-1]:
@@ -386,7 +386,7 @@
             # we already have one buffer directly before where we want to go
             self.__buffer2 = LineBuffer(self._input,
                                         position,
-                                        self.buffer_size)            
+                                        self.buffer_size)
             self.__buffer = self.__buffer2
             self.__rel_index = 0
         elif self.__buffer2 and self.__buffer2.offsets[-1] == position:
@@ -394,7 +394,7 @@
             self.__buffer1 = self.__buffer2
             self.__buffer2 = LineBuffer(self._input,
                                         position,
-                                        self.buffer_size)            
+                                        self.buffer_size)
             self.__buffer = self.__buffer2
             self.__rel_index = 0
         else:
@@ -417,7 +417,7 @@
 
     def calculate_line_no(self):
         """ Calculate the current line number from buffer offsets
-        
+
         If line number is unknown it is calculated by parsing the whole file.
         This may be expensive.
         """
--- a/MoinMoin/logfile/editlog.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/logfile/editlog.py	Mon Jul 02 23:33:20 2007 +0200
@@ -202,7 +202,7 @@
         result = EditLogLine(self._usercache)
         (result.ed_time_usecs, result.rev, result.action,
          result.pagename, result.addr, result.hostname, result.userid,
-         result.extra, result.comment,) = fields[:self._NUM_FIELDS]
+         result.extra, result.comment, ) = fields[:self._NUM_FIELDS]
         if not result.hostname:
             result.hostname = result.addr
         result.pagename = wikiutil.unquoteWikiname(result.pagename.encode('ascii'))
--- a/MoinMoin/logfile/eventlog.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/logfile/eventlog.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,6 +1,6 @@
 """
     MoinMoin event log class
-    
+
     The global event-log is mainly used for statistics (e.g. EventStats).
 
     @copyright: 2007 MoinMoin:ThomasWaldmann
--- a/MoinMoin/macro/AdvancedSearch.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/macro/AdvancedSearch.py	Mon Jul 02 23:33:20 2007 +0200
@@ -20,7 +20,7 @@
 
 def form_get(request, name, default=''):
     """ Fetches a form field
-    
+
     @param request: current request
     @param name: name of the field
     @keyword default: value if not present (default: '')
--- a/MoinMoin/macro/EditedSystemPages.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/macro/EditedSystemPages.py	Mon Jul 02 23:33:20 2007 +0200
@@ -32,7 +32,7 @@
         # exists, because our filter check this already.
         pages = self.request.rootpage.getPageList(filter=filterfn, exists=0)
 
-        # Format as numberd list, sorted by page name         
+        # Format as numberd list, sorted by page name
         pages.sort()
         result = []
         f = self.formatter
--- a/MoinMoin/macro/EmbedObject.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/macro/EmbedObject.py	Mon Jul 02 23:33:20 2007 +0200
@@ -10,7 +10,7 @@
     CALLING SEQUENCE:
         [[EmbedObject(attachment[,width=width][,height=height][,alt=Embedded mimetpye/xy])]]
 
-    SUPPORTED MIMETYPES:  
+    SUPPORTED MIMETYPES:
          application/x-shockwave-flash
          application/x-dvi
          application/postscript
@@ -34,7 +34,7 @@
 
          chemical/x-pdb
 
-         x-world/x-vrml  
+         x-world/x-vrml
 
     INPUTS:
         attachment: name of attachment
@@ -56,7 +56,7 @@
            menu = true
 
 
-        All do use width, height, mime_type, alt   
+        All do use width, height, mime_type, alt
 
         in addition:
            'video' do use  repeat, autostart, menu, op
@@ -93,15 +93,15 @@
         If the attachment file isn't uploaded yet the attachment line will be shown.
         If you give only one size argument, e.g. width only, the other one will be calculated.
 
-        By the swftools it is possible to get the swf size returned. I don't know if it is 
-        possible to get sizes for svg, pdf and others detected too, that's the reason why 
+        By the swftools it is possible to get the swf size returned. I don't know if it is
+        possible to get sizes for svg, pdf and others detected too, that's the reason why
         I haven't added it by now.
 
         Please add needed mimetypes as objects.
 
 
     RESTRICTIONS:
-        Some mimetypes do ignore all used keywords. May be they do use different names.        
+        Some mimetypes do ignore all used keywords. May be they do use different names.
 
 
     MODIFICATION HISTORY:
@@ -172,9 +172,9 @@
         if not mt:
             return _("Not supported mimetype of file: %s" % self.target)
 
-        mime_type = "%s/%s" % (mt.major, mt.minor,)
+        mime_type = "%s/%s" % (mt.major, mt.minor, )
         dangerous = mime_type in self.request.cfg.mimetypes_xss_protect
-        
+
         if not mime_type in self.request.cfg.mimetypes_embed or dangerous:
             kw = {'src': url}
             return "%s: %s%s%s" % (self.macro.formatter.text('Embedding of object by choosen formatter not possible'),
@@ -184,7 +184,7 @@
 
         if self.alt is "":
             self.alt = "%(text)s %(mime_type)s" % {
-                           'text': _("Embedded"), 
+                           'text': _("Embedded"),
                            'mime_type': mime_type,
                         }
 
@@ -282,7 +282,7 @@
         url = AttachFile.getAttachUrl(pagename, fname, self.request)
 
         mt = wikiutil.MimeType(filename=fname)
-        mimestr = "%s/%s" % (mt.major, mt.minor,)
+        mimestr = "%s/%s" % (mt.major, mt.minor, )
         # XXX Should better use formatter.embed if available?
         return self.macro.formatter.rawHTML(self.embed(mt, url))
 
--- a/MoinMoin/macro/FootNote.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/macro/FootNote.py	Mon Jul 02 23:33:20 2007 +0200
@@ -55,7 +55,7 @@
             formatter.anchorlink(1, fwdlink_id, id=backlink_id),
             formatter.text(str(showidx+1)),
             formatter.anchorlink(0),
-            formatter.sup(0),)
+            formatter.sup(0), )
 
     # nothing to do or emit
     return ''
--- a/MoinMoin/macro/Hits.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/macro/Hits.py	Mon Jul 02 23:33:20 2007 +0200
@@ -9,7 +9,7 @@
 
         all: if set to 1 then cummulative hits over all wiki pages is returned. Default is 0
         filter: if set to SAVEPAGE then the saved pages are counted. Default is VIEWPAGE.
-    
+
    @copyright: 2004-2007 MoinMoin:ReimarBauer
                2005 BenjaminVrolijk
    @license: GNU GPL, see COPYING for details.
@@ -49,7 +49,7 @@
             pagename = event[2].get('pagename', None)
             if not kw["all"]:
                 if pagename == formatter.page.page_name:
-                   self.count += 1
+                    self.count += 1
             else:
                 self.count += 1
 
--- a/MoinMoin/macro/ImageLink.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/macro/ImageLink.py	Mon Jul 02 23:33:20 2007 +0200
@@ -6,7 +6,7 @@
     as either attachment or URL) and links to either an URL or a wiki page.
     Optionally the size of the image can be adjusted.
     If no target is given the link will point to the image itself.
-    
+
     Syntax:
         [[ImageLink(image, [target,] [width=width, [height=height]])]]
 
@@ -30,16 +30,16 @@
         [[ImageLink(münchen.png,http://www.muenchen.de,width=50)]]
         [[ImageLink(http://webcam.portalmuc.de/images/webcam/webcam_marienplatz.jpg)]]
         [[ImageLink(example.png,alt=whateveryouwant(üöä))]]
-        [[ImageLink(http://moinmoin.wikiwikiweb.de/OliverSiemoneit?action=AttachFile&do=get&target=screenshot.png,width=647,height=517,alt=OliverSiemoneit?action=AttachFile&do=get&target=screenshot,FrontPage)]] 
+        [[ImageLink(http://moinmoin.wikiwikiweb.de/OliverSiemoneit?action=AttachFile&do=get&target=screenshot.png,width=647,height=517,alt=OliverSiemoneit?action=AttachFile&do=get&target=screenshot,FrontPage)]]
 
     History:
-        Jeff Kunce: 
+        Jeff Kunce:
             wrote the first published version of this macro in 2001.
-        
+
         Reimar Bauer:
             2004 intitial new version for MoinMoin 1.2
-        
-        Marcin Zalewski:   
+
+        Marcin Zalewski:
             Implemented wikiutil.link_tag and macro.formatter.pagelink.
             Added title attribute to the created link. One could generalize that to
             add arbitrary attributes.
@@ -50,8 +50,8 @@
             with a corresponding value to add class to <img> element. To add class to <a> element
             one needs to add 'css_class' key with a corresponding value to the dictionary passed to
             pagelink call.
-        
-       Reimar Bauer:    
+
+       Reimar Bauer:
             2004-12-23 Adapted to MoinMoin Version 1.3.1-1
             2004-12-23 Syntax change Version 1.3.1-2
                    width and height and probably other keywords must be given as keywords (e.g. height=20)
@@ -61,26 +61,26 @@
             2005-03-28 Version 1.3.3-6 feature request added by CDPark:
                        "Can we use an external image? And an external target?"
             2005-04-16 Version 1.3.3-7 no default alt tag definition as requested by CDPark and AlexanderSchremmer
-       
+
        Chong-Dae Park:
             2005-04-17 Version 1.3.3-8 code refactored
                        IMG with no alt tag is not recommended in the HTML standard.
                        It keeps a user specified alt tag. If there is none, it tries to make on using the WikiName
                        or image name instead.
-       
+
        Reimar Bauer:
             2005-04-21 Version 1.3.3-9 bug fixed
                        When the image does not exist yet, it gives you a "Upload Image" link, this link does not
                        work. I suspect that this only is a problem on sub-pages, caused by incorrect escaping of
                         "/". -- CraigJohnson
- 
+
             2005-12-19 Versiom 1.5.0-10 feature added to link to images on different wiki pages
             2006-02-14 Version 1.5.2-11 bug fixed for filename of attached image is Chinese (encode added)
             2006-02-22 Version 1.5.2-12 code refactored
 
       Thomas Waldmann
             2006-03-10 code refactored
-            
+
       Reimar Bauer
              2006-09-22 bug fix of image linked to attachment and inline
              2006-10-08 patch of DavidLinke added and keys now only lowercase used
@@ -90,7 +90,7 @@
                 2004 by Marcin Zalewski,
                 2006 by MoinMoin:ThomasWaldmann,
                 2004-2007 by MoinMoin:ReimarBauer
-                
+
     @license: GNU GPL, see COPYING for details.
 """
 
@@ -104,7 +104,7 @@
     return '://' in text
 
 def explore_args(args, kwAllowed):
-    """ 
+    """
     explore args for positional and keyword parameters
     """
     if args:
--- a/MoinMoin/macro/Include.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/macro/Include.py	Mon Jul 02 23:33:20 2007 +0200
@@ -7,7 +7,7 @@
         http://purl.net/wiki/moinmaster/HelpOnMacros/Include
 
     for detailed docs.
-    
+
     @copyright: 2000-2004 Juergen Hermann <jh@web.de>,
                 2000-2001 Richard Jones <richard@bizarsoftware.com.au>
     @license: GNU GPL, see COPYING for details.
@@ -60,7 +60,7 @@
     # parse and check arguments
     args = text and args_re.match(text)
     if not args:
-        return (_sysmsg % ('error', _('Invalid include arguments "%s"!')) % (text,))
+        return (_sysmsg % ('error', _('Invalid include arguments "%s"!')) % (text, ))
 
     # prepare including page
     result = []
@@ -101,7 +101,7 @@
         if not request.user.may.read(inc_name):
             continue
         if inc_name in this_page._macroInclude_pagelist:
-            result.append(u'<p><strong class="error">Recursive include of "%s" forbidden</strong></p>' % (inc_name,))
+            result.append(u'<p><strong class="error">Recursive include of "%s" forbidden</strong></p>' % (inc_name, ))
             continue
         if skipitems:
             skipitems -= 1
@@ -231,8 +231,8 @@
         if editlink and not (level or print_mode):
             result.extend([
                 macro.formatter.div(1, css_class="include-link"),
-                inc_page.link_to(request, '[%s]' % (inc_name,), css_class="include-page-link"),
-                inc_page.link_to(request, '[%s]' % (_('edit'),), css_class="include-edit-link", querystr={'action': 'edit', 'backto': request._Include_backto}),
+                inc_page.link_to(request, '[%s]' % (inc_name, ), css_class="include-page-link"),
+                inc_page.link_to(request, '[%s]' % (_('edit'), ), css_class="include-edit-link", querystr={'action': 'edit', 'backto': request._Include_backto}),
                 macro.formatter.div(0),
             ])
         # XXX page.link_to is wrong now, it escapes the edit_icon html as it escapes normal text
--- a/MoinMoin/macro/MonthCalendar.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/macro/MonthCalendar.py	Mon Jul 02 23:33:20 2007 +0200
@@ -136,8 +136,8 @@
 Anniversary Calendars: (no year data)
 [[MonthCalendar(Yearly,,,+1,,6,1)]]
 
-This creates calendars of the format Yearly/MM-DD 
-By leaving out the year, you can set birthdays, and anniversaries in this 
+This creates calendars of the format Yearly/MM-DD
+By leaving out the year, you can set birthdays, and anniversaries in this
 calendar and not have to re-enter each year.
 
 This creates a calendar which uses MonthCalendarTemplate for directly editing
@@ -249,7 +249,7 @@
         text2 = macro.form['calparms'][0]
         args2 = args_re.match(text2)
         if not args2:
-            return ('<p><strong class="error">%s</strong></p>' % _('Invalid MonthCalendar calparms "%s"!')) % (text2,)
+            return ('<p><strong class="error">%s</strong></p>' % _('Invalid MonthCalendar calparms "%s"!')) % (text2, )
         else:
             has_calparms = 1 # yes!
             cparmpagename, cparmyear, cparmmonth, cparmoffset, cparmoffset2, cparmheight6, cparmanniversary, cparmtemplate = \
@@ -264,7 +264,7 @@
         # parse and check arguments
         args = args_re.match(text)
         if not args:
-            return ('<p><strong class="error">%s</strong></p>' % _('Invalid MonthCalendar arguments "%s"!')) % (text,)
+            return ('<p><strong class="error">%s</strong></p>' % _('Invalid MonthCalendar arguments "%s"!')) % (text, )
         else:
             parmpagename, parmyear, parmmonth, parmoffset, parmoffset2, parmheight6, anniversary, parmtemplate = \
                 parseargs(args, thispage, currentyear, currentmonth, 0, 0, 0, 0, '')
--- a/MoinMoin/macro/Navigation.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/macro/Navigation.py	Mon Jul 02 23:33:20 2007 +0200
@@ -201,7 +201,7 @@
         filter_regex = '^%s/' % re.escape(parent)
         pos, size, links = _getLinks(request, self.pagename, filter_regex)
         pos += 1
-        links = zip(labels, (parent,) + links)
+        links = zip(labels, (parent, ) + links)
 
         # generate links to neighborhood
         for label, name in links:
--- a/MoinMoin/macro/NewPage.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/macro/NewPage.py	Mon Jul 02 23:33:20 2007 +0200
@@ -26,7 +26,7 @@
     Usage:
 
         [[NewPage(template, buttonLabel, parentPage)]]
-        
+
     Examples:
 
         [[NewPage]]
@@ -35,7 +35,7 @@
             page will not use a template.
 
         [[NewPage(BugTemplate, Create New Bug, MoinMoinBugs)]]
-        
+
             Create an input field with button labeled 'Create New
             Bug'.  The new page will use the BugTemplate template,
             and create the page as a subpage of MoinMoinBugs.
--- a/MoinMoin/macro/RandomPage.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/macro/RandomPage.py	Mon Jul 02 23:33:20 2007 +0200
@@ -16,7 +16,7 @@
 def execute(macro, args):
     request = macro.request
 
-    # get number of wanted links        
+    # get number of wanted links
     try:
         links = max(int(args), 1)
     except StandardError:
--- a/MoinMoin/macro/RandomQuote.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/macro/RandomQuote.py	Mon Jul 02 23:33:20 2007 +0200
@@ -7,14 +7,14 @@
     Usage:
         [[RandomQuote()]]
         [[RandomQuote(WikiTips)]]
-    
+
     Comments:
         It will look for list delimiters on the page in question.
         It will ignore anything that is not in an "*" list.
 
     @copyright: 2002-2004 Juergen Hermann <jh@web.de>
     @license: GNU GPL, see COPYING for details.
-    
+
     Originally written by Thomas Waldmann.
     Gustavo Niemeyer added wiki markup parsing of the quotes.
 """
--- a/MoinMoin/macro/RecentChanges.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/macro/RecentChanges.py	Mon Jul 02 23:33:20 2007 +0200
@@ -299,7 +299,7 @@
         hilite = line.ed_time_usecs > (bookmark_usecs or line.ed_time_usecs)
 
         if ((this_day != day or (not hilite and not max_days))) and len(pages) > 0:
-            # new day or bookmark reached: print out stuff 
+            # new day or bookmark reached: print out stuff
             this_day = day
             for p in pages:
                 ignore_pages[p] = None
@@ -340,7 +340,7 @@
             pages[line.pagename] = [line]
     else:
         if len(pages) > 0:
-            # end of loop reached: print out stuff 
+            # end of loop reached: print out stuff
             # XXX duplicated code from above
             # but above does not trigger if we have the first day in wiki history
             for p in pages:
--- a/MoinMoin/macro/SystemInfo.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/macro/SystemInfo.py	Mon Jul 02 23:33:20 2007 +0200
@@ -79,7 +79,7 @@
                 ftversion = None
             except AttributeError:
                 ftversion = 'N/A'
-    
+
             if ftversion:
                 row(_('4Suite Version'), ftversion)
 
@@ -153,7 +153,7 @@
 
         row(_('Xapian search'), xapRow)
         row(_('Xapian Version'), xapVersion)
- 
+
         stems = [nonestr]
         try:
             import Stemmer
@@ -161,10 +161,10 @@
                 stems = Stemmer.algorithms()
                 stemVersion = Stemmer.version()
             except:
-                 stemVersion = _('!PyStemmer not installed')
+                stemVersion = _('!PyStemmer not installed')
         except ImportError:
             stemVersion = _('!PyStemmer not installed')
- 
+
         row(_('Stemming for Xapian'), xapState[request.cfg.xapian_stemming])
         row(_('!PyStemmer Version'), stemVersion)
         row(_('!PyStemmer stems'), ', '.join(stems) or nonestr)
--- a/MoinMoin/macro/TableOfContents.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/macro/TableOfContents.py	Mon Jul 02 23:33:20 2007 +0200
@@ -151,7 +151,7 @@
         # Add the heading
         unique_id = ''
         if self.titles[pntt] > 1:
-            unique_id = '-%d' % (self.titles[pntt],)
+            unique_id = '-%d' % (self.titles[pntt], )
 
         # close last listitem if same level
         if self.indent == newindent:
--- a/MoinMoin/macro/__init__.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/macro/__init__.py	Mon Jul 02 23:33:20 2007 +0200
@@ -49,12 +49,12 @@
 #############################################################################
 
 class Macro:
-    """ Macro handler 
-    
-    There are three kinds of macros: 
+    """ Macro handler
+
+    There are three kinds of macros:
      * Builtin Macros - implemented in this file and named _macro_[name]
      * Language Pseudo Macros - any lang the wiki knows can be use as
-       macro and is implemented here by _m_lang() 
+       macro and is implemented here by _m_lang()
      * External macros - implemented in either MoinMoin.macro package, or
        in the specific wiki instance in the plugin/macro directory
     """
@@ -96,10 +96,10 @@
         self.name = None
 
     def execute(self, macro_name, args):
-        """ Get and execute a macro 
-        
+        """ Get and execute a macro
+
         Try to get a plugin macro, or a builtin macro or a language
-        macro, or just raise ImportError. 
+        macro, or just raise ImportError.
         """
         self.name = macro_name
         try:
@@ -117,7 +117,7 @@
 
     def _m_lang(self, text):
         """ Set the current language for page content.
-        
+
             Language macro are used in two ways:
              * [lang] - set the current language until next lang macro
              * [lang(text)] - insert text with specific lang inside page
@@ -207,7 +207,7 @@
         for word in all_words:
             letter = wikiutil.getUnicodeIndexGroup(word)
             if letter != current_letter:
-                cssid = "idx" + wikiutil.quoteWikinameURL(letter).replace('%','')
+                cssid = "idx" + wikiutil.quoteWikinameURL(letter).replace('%', '')
                 output.append(fmt.heading(1, 2, id=cssid)) # fmt.anchordef didn't work
                 output.append(fmt.text(letter.replace('~', 'Others')))
                 output.append(fmt.heading(0, 2))
@@ -234,7 +234,7 @@
         def _make_index_key(index_letters):
             index_letters.sort()
             def letter_link(ch):
-                cssid = "idx" + wikiutil.quoteWikinameURL(ch).replace('%','')
+                cssid = "idx" + wikiutil.quoteWikinameURL(ch).replace('%', '')
                 return fmt.anchorlink(1, cssid) + fmt.text(ch.replace('~', 'Others')) + fmt.anchorlink(0)
             links = [letter_link(letter) for letter in index_letters]
             return ' | '.join(links)
@@ -296,7 +296,7 @@
 
     def _macro_PageCount(self, args):
         """ Return number of pages readable by current user
-        
+
         Return either an exact count (slow!) or fast count including
         deleted pages.
         """
@@ -324,7 +324,7 @@
             needle_re = re.compile(args or '', re.IGNORECASE)
         except re.error, e:
             return "<strong>%s: %s</strong>" % (
-                _("ERROR in regex '%s'") % (args,), e)
+                _("ERROR in regex '%s'") % (args, ), e)
 
         # Get page list readable by current user, filtered by needle
         hits = self.request.rootpage.getPageList(filter=needle_re.search)
@@ -365,7 +365,7 @@
                 tm = (year, month, day, hour, minute, second, 0, 0, 0)
             except ValueError, e:
                 return "<strong>%s: %s</strong>" % (
-                    _("Bad timestamp '%s'") % (args,), e)
+                    _("Bad timestamp '%s'") % (args, ), e)
             # as mktime wants a localtime argument (but we only have UTC),
             # we adjust by our local timezone's offset
             try:
@@ -378,7 +378,7 @@
                 tm = float(args)
             except ValueError, e:
                 return "<strong>%s: %s</strong>" % (
-                    _("Bad timestamp '%s'") % (args,), e)
+                    _("Bad timestamp '%s'") % (args, ), e)
         return format_date(tm)
 
     def _macro_Date(self, args):
@@ -424,10 +424,10 @@
         else:
             # unknown user, maybe even a spambot, so
             # just return text as given in macro args
-            
+
             if text:
                 result = self.formatter.text(text+" ")
-            
+
             result += self.formatter.code(1) + \
                 self.formatter.text("<%s>" % email) + \
                 self.formatter.code(0)
--- a/MoinMoin/macro/_tests/test_ImageLink.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/macro/_tests/test_ImageLink.py	Mon Jul 02 23:33:20 2007 +0200
@@ -70,10 +70,10 @@
         assert result == expected
 
     def testImageLinkTwoParamsOneKeyword(self):
-        """ macro ImageLink test: [[ImageLink(http://static.wikiwikiweb.de/logos/moindude.png, alt=The old dude, FrontPage)]] 
-        order of keywords to parameter list is independent 
+        """ macro ImageLink test: [[ImageLink(http://static.wikiwikiweb.de/logos/moindude.png, alt=The old dude, FrontPage)]]
+        order of keywords to parameter list is independent
         """
-        self.shouldDeleteTestPage = True 
+        self.shouldDeleteTestPage = True
 
         result = self._test_macro('ImageLink', 'http://static.wikiwikiweb.de/logos/moindude.png, alt=The old dude, FrontPage')
         expected = '<a href="./FrontPage"><img alt="The old dude" src="http://static.wikiwikiweb.de/logos/moindude.png" title="The old dude" /></a>'
--- a/MoinMoin/mail/_tests/test_sendmail.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/mail/_tests/test_sendmail.py	Mon Jul 02 23:33:20 2007 +0200
@@ -47,10 +47,10 @@
 
 class TestEncodeAddress(unittest.TestCase):
     """ Address encoding tests
-    
-    See http://www.faqs.org/rfcs/rfc2822.html section 3.4. 
+
+    See http://www.faqs.org/rfcs/rfc2822.html section 3.4.
     Address Specification.
-            
+
     mailbox     =   name-addr / addr-spec
     name-addr   =   [display-name] angle-addr
     angle-addr  =   [CFWS] "<" addr-spec ">" [CFWS] / obs-angle-addr
@@ -90,8 +90,8 @@
                              expected)
 
     def testEmptyAddress(self):
-        """ mail.sendmail: encode address with empty address: 'Phrase <>' 
-        
+        """ mail.sendmail: encode address with empty address: 'Phrase <>'
+
         Let the smtp server handle this. We may raise error in such
         case, but we don't do error checking for mail addresses.
         """
@@ -102,8 +102,8 @@
                              expected)
 
     def testInvalidAddress(self):
-        """ mail.sendmail: encode invalid address 'Phrase <blah' 
-        
+        """ mail.sendmail: encode invalid address 'Phrase <blah'
+
         Assume that this is a simple address. This address will
         probably cause an error when trying to send mail. Junk in, junk
         out.
--- a/MoinMoin/mail/mailimport.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/mail/mailimport.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,6 +1,6 @@
 """
     MoinMoin - E-Mail Import into wiki
-    
+
     Just call this script with the URL of the wiki as a single argument
     and feed the mail into stdin.
 
--- a/MoinMoin/mail/sendmail.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/mail/sendmail.py	Mon Jul 02 23:33:20 2007 +0200
@@ -14,11 +14,11 @@
 
 
 def encodeAddress(address, charset):
-    """ Encode email address to enable non ascii names 
-    
+    """ Encode email address to enable non ascii names
+
     e.g. '"Jürgen Hermann" <jh@web.de>'. According to the RFC, the name
     part should be encoded, the address should not.
-    
+
     @param address: email address, posibly using '"name" <address>' format
     @type address: unicode
     @param charset: sepcifying both the charset and the encoding, e.g
@@ -40,9 +40,9 @@
 
 def sendmail(request, to, subject, text, **kw):
     """ Create and send a text/plain message
-        
+
     Return a tuple of success or error indicator and message.
-    
+
     @param request: the request object
     @param to: recipients (list)
     @param subject: subject of email (unicode)
@@ -148,7 +148,7 @@
 
     Decode a spam-safe email address in `address` by applying the
     following rules:
-    
+
     Known all-uppercase words and their translation:
         "DOT"   -> "."
         "AT"    -> "@"
@@ -158,7 +158,7 @@
     Use that to make it even harder for spam bots!
 
     Blanks (spaces) simply get stripped.
-    
+
     @param address: obfuscated email address string
     @rtype: string
     @return: decoded email address
--- a/MoinMoin/packages.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/packages.py	Mon Jul 02 23:33:20 2007 +0200
@@ -141,10 +141,10 @@
                     os.chmod(target, config.umask )
                     action = 'ATTNEW'
                     edit_logfile_append(self, pagename, path, rev, action, logname='edit-log',
-                                       comment=u'%(filename)s' % {"filename":filename}, author=author)
+                                       comment=u'%(filename)s' % {"filename": filename}, author=author)
                 self.msg += u"%(filename)s attached \n" % {"filename": filename}
             else:
-                self.msg += u"%(filename)s not attached \n" % {"filename":filename}
+                self.msg += u"%(filename)s not attached \n" % {"filename": filename}
         else:
             self.msg += u"action add attachment: not enough rights - nothing done \n"
 
@@ -168,10 +168,10 @@
                 os.remove(target)
                 action = 'ATTDEL'
                 edit_logfile_append(self, pagename, path, rev, action, logname='edit-log',
-                                    comment=u'%(filename)s' % {"filename":filename}, author=author)
-                self.msg += u"%(filename)s removed \n" % {"filename":filename}
+                                    comment=u'%(filename)s' % {"filename": filename}, author=author)
+                self.msg += u"%(filename)s removed \n" % {"filename": filename}
             else:
-                self.msg += u"%(filename)s not exists \n" % {"filename":filename}
+                self.msg += u"%(filename)s not exists \n" % {"filename": filename}
         else:
             self.msg += u"action delete attachment: not enough rights - nothing done \n"
 
--- a/MoinMoin/parser/_ParserBase.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/parser/_ParserBase.py	Mon Jul 02 23:33:20 2007 +0200
@@ -47,16 +47,16 @@
     attrs, msg = wikiutil.parseAttributes(request, args)
     if not msg:
         try:
-            start = int(attrs.get('start','"1"')[1:-1])
+            start = int(attrs.get('start', '"1"')[1:-1])
         except ValueError:
             pass
         try:
-            step = int(attrs.get('step','"1"')[1:-1])
+            step = int(attrs.get('step', '"1"')[1:-1])
         except ValueError:
             pass
-        if attrs.get('numbers','"on"')[1:-1].lower() in ('off', 'false', 'no'):
+        if attrs.get('numbers', '"on"')[1:-1].lower() in ('off', 'false', 'no'):
             nums = 0
-        elif attrs.get('numbers','"on"')[1:-1].lower() in ('none', 'disable'):
+        elif attrs.get('numbers', '"on"')[1:-1].lower() in ('none', 'disable'):
             nums = -1
     return nums, start, step, attrs
 
@@ -64,7 +64,7 @@
     pass
 
 class FormatText(FormatTextBase):
-    
+
     def __init__(self, fmt):
         self.fmt = fmt
 
@@ -74,7 +74,7 @@
                 formatter.code_token(0, self.fmt))
 
 class FormatTextID(FormatTextBase):
-    
+
     def __init__(self, fmt, icase=0):
         if not isinstance(fmt, FormatText):
             self.def_fmt = FormatText(fmt)
@@ -87,10 +87,10 @@
         if self._ignore_case:
             word = word.lower()
         self.fmt[word] = fmt
-        
+
     def setDefaultFormat(self, fmt):
         self.def_fmt = fmt
-        
+
     def formatString(self, formatter, word):
         if self._ignore_case:
             sword = word.lower()
@@ -99,19 +99,19 @@
         return self.fmt.get(sword, self.def_fmt).formatString(formatter, word)
 
 class FormattingRuleSingle:
-    
+
     def __init__(self, name, str_re, icase=0):
         self.name = name
         self.str_re = str_re
-        
+
     def getStartRe(self):
         return self.str_re
-    
+
     def getText(self, parser, hit):
         return hit
 
 class FormattingRulePair:
-    
+
     def __init__(self, name, str_begin, str_end, icase=0):
         self.name = name
         self.str_begin = str_begin
@@ -120,10 +120,10 @@
             self.end_re = re.compile(str_end, re.M|re.I)
         else:
             self.end_re = re.compile(str_end, re.M)
-        
+
     def getStartRe(self):
         return self.str_begin
-    
+
     def getText(self, parser, hit):
         match = self.end_re.search(parser.line, parser.lastpos)
         if not match:
@@ -140,11 +140,11 @@
 class ParserBase:
 
     parsername = 'ParserBase'
-    
+
     def __init__(self, raw, request, **kw):
         self.raw = raw
         self.request = request
-        self.show_nums, self.num_start, self.num_step, attrs = parse_start_step(request, kw.get('format_args',''))
+        self.show_nums, self.num_start, self.num_step, attrs = parse_start_step(request, kw.get('format_args', ''))
 
         self._ignore_case = 0
         self._formatting_rules = []
@@ -197,13 +197,13 @@
 
     def addConstant(self, words):
         self.addWords(words, self.constant_word_format)
-        
+
     def addRuleFormat(self, name, fmt=None):
         if fmt is None:
             fmt = FormatText(name)
         self.rule_fmt[name] = fmt
 
-    def format(self, formatter, form = None):
+    def format(self, formatter, form=None):
         """ Send the text.
         """
 
@@ -212,7 +212,7 @@
         l = []
         for n, f in self._formatting_rules:
             l.append("(?P<%s>%s)" % (n, f.getStartRe()))
-        
+
         if self._ignore_case:
             scan_re = re.compile("|".join(l), re.M|re.I)
         else:
@@ -226,7 +226,7 @@
 
         self.request.write(formatter.code_line(1))
             #formatter, len('%d' % (self.line_count,)))
-        
+
         match = scan_re.search(self.line)
 
         while match and self.lastpos < len(self.line):
--- a/MoinMoin/parser/_tests/test_text_moin_wiki.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/parser/_tests/test_text_moin_wiki.py	Mon Jul 02 23:33:20 2007 +0200
@@ -136,7 +136,7 @@
 
     def testHeadingWithWhiteSpace(self):
         """ parser.wiki: TOC links to headings with white space
-        
+
         See bug: TableOfContentsBreakOnExtraSpaces.
 
         Does not test TOC or heading formating, just verify that spaces
@@ -159,47 +159,47 @@
 
 
 class TestDateTimeMacro(ParserTestCase):
-   """ Test DateTime macro
-
-   Might fail due to libc problems, therefore the fail message warn
-   about this.
-
-   TODO: when this test fail, does it mean that moin code fail on that
-   machine? - can we fix this?
-   """
+    """ Test DateTime macro
 
-   text = 'AAA %s AAA'
-   needle = re.compile(text % r'(.+)')
-   _tests = (
-       # test                                   expected
-       ('[[DateTime(1970-01-06T00:00:00)]]',   '1970-01-06 00:00:00'),
-       ('[[DateTime(259200)]]',                '1970-01-04 00:00:00'),
-       ('[[DateTime(2003-03-03T03:03:03)]]',   '2003-03-03 03:03:03'),
-       ('[[DateTime(2000-01-01T00:00:00Z)]]',  '2000-01-01 00:00:00'),
-       ('[[Date(2002-02-02T01:02:03Z)]]',      '2002-02-02'),
-       )
+    Might fail due to libc problems, therefore the fail message warn
+    about this.
 
-   def setUp(self):
-       """ Require default date and time format config values """
-       self.config = self.TestConfig(defaults=('date_fmt', 'datetime_fmt'))
-
-   def tearDown(self):
-       del self.config
+    TODO: when this test fail, does it mean that moin code fail on that
+    machine? - can we fix this?
+    """
 
-   def testDateTimeMacro(self):
-       """ parser.wiki: DateTime macro """
-       note = """
-   
-   If this fails, it is likely a problem in your python / libc,
-   not in moin.  See also:
-   <http://sourceforge.net/tracker/index.php?func=detail&
+    text = 'AAA %s AAA'
+    needle = re.compile(text % r'(.+)')
+    _tests = (
+        # test                                   expected
+        ('[[DateTime(1970-01-06T00:00:00)]]',   '1970-01-06 00:00:00'),
+        ('[[DateTime(259200)]]',                '1970-01-04 00:00:00'),
+        ('[[DateTime(2003-03-03T03:03:03)]]',   '2003-03-03 03:03:03'),
+        ('[[DateTime(2000-01-01T00:00:00Z)]]',  '2000-01-01 00:00:00'),
+        ('[[Date(2002-02-02T01:02:03Z)]]',      '2002-02-02'),
+        )
+
+    def setUp(self):
+        """ Require default date and time format config values """
+        self.config = self.TestConfig(defaults=('date_fmt', 'datetime_fmt'))
+
+    def tearDown(self):
+        del self.config
+
+    def testDateTimeMacro(self):
+        """ parser.wiki: DateTime macro """
+        note = """
+
+    If this fails, it is likely a problem in your python / libc,
+    not in moin.  See also:
+    <http://sourceforge.net/tracker/index.php?func=detail&
        aid=902172&group_id=5470&atid=105470>"""
 
-       for test, expected in self._tests:
-           html = self.parse(self.text % test)
-           result = self.needle.search(html).group(1)
-           self.assertEqual(result, expected,
-               'Expected "%(expected)s" but got "%(result)s"; %(note)s' % locals())
+        for test, expected in self._tests:
+            html = self.parse(self.text % test)
+            result = self.needle.search(html).group(1)
+            self.assertEqual(result, expected,
+                'Expected "%(expected)s" but got "%(result)s"; %(note)s' % locals())
 
 
 class TestTextFormatingTestCase(ParserTestCase):
@@ -441,7 +441,7 @@
 
     def testEmptyLineBeforeBlock(self):
         """ parser.wiki: empty lines before block element ignored
-        
+
         Empty lines separate paragraphs, but should be ignored if a block
         element follow.
 
@@ -474,7 +474,7 @@
                          'Expected "%(expected)s" but got "%(result)s"' % locals())
 
     def testColorizedPythonParserAndNestingPreBrackets(self):
-        """ tests nested {{{ }}} for the python colorized parser 
+        """ tests nested {{{ }}} for the python colorized parser
         """
 
         raw = """{{{
@@ -489,7 +489,7 @@
         assert expected == result
 
     def testColorizedPythonParserAndNestingPreBracketsWithLinebreak(self):
-        """ tests nested {{{ }}} for the python colorized parser 
+        """ tests nested {{{ }}} for the python colorized parser
         """
 
         raw = """{{{
@@ -506,7 +506,7 @@
         assert expected == result
 
     def testNestingPreBrackets(self):
-        """ tests nested {{{ }}} for the wiki parser 
+        """ tests nested {{{ }}} for the wiki parser
         """
 
         raw = """{{{
@@ -520,7 +520,7 @@
         assert expected == result
 
     def testNestingPreBracketsWithLinebreak(self):
-        """ tests nested {{{ }}} for the wiki parser 
+        """ tests nested {{{ }}} for the wiki parser
         """
 
         raw = """{{{
@@ -536,7 +536,7 @@
         assert expected == result
 
     def testTextBeforeNestingPreBrackets(self):
-        """ tests text before nested {{{ }}} for the wiki parser 
+        """ tests text before nested {{{ }}} for the wiki parser
         """
 
         raw = """Example
@@ -550,7 +550,7 @@
         assert expected == result
 
     def testManyNestingPreBrackets(self):
-        """ tests two nestings  ({{{ }}} and {{{ }}}) in one line for the wiki parser 
+        """ tests two nestings  ({{{ }}} and {{{ }}}) in one line for the wiki parser
         """
 
         raw = """{{{
--- a/MoinMoin/parser/text.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/parser/text.py	Mon Jul 02 23:33:20 2007 +0200
@@ -21,7 +21,7 @@
     ## which is used as fallback
     extensions = '*'
     Dependencies = []
-    
+
     def __init__(self, raw, request, **kw):
         self.raw = raw
         self.request = request
--- a/MoinMoin/parser/text_cplusplus.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/parser/text_cplusplus.py	Mon Jul 02 23:33:20 2007 +0200
@@ -32,11 +32,11 @@
     parsername = "ColorizedCPlusPlus"
     extensions = ['.c', '.h', '.cpp', '.c++']
     Dependencies = []
-    
+
     def setupRules(self):
         ParserBase.setupRules(self)
 
-        self.addRulePair("Comment", "/[*]","[*]/")
+        self.addRulePair("Comment", "/[*]", "[*]/")
         self.addRule("Comment", "//.*$")
         self.addRulePair("String", 'L?"', r'$|[^\\](\\\\)*"')
         self.addRule("Char", r"'\\.'|'[^\\]'")
@@ -65,6 +65,6 @@
         self.addReserved(reserved_words)
         self.addConstant(constant_words)
 
-        self.addWords(reserved_words2,'ResWord2')
-        self.addWords(special_words,'Special')
+        self.addWords(reserved_words2, 'ResWord2')
+        self.addWords(special_words, 'Special')
 
--- a/MoinMoin/parser/text_csv.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/parser/text_csv.py	Mon Jul 02 23:33:20 2007 +0200
@@ -31,7 +31,7 @@
         # parse extra arguments for excludes
         self.exclude = []
         self.separator = ';'
-        for arg in kw.get('format_args','').split():
+        for arg in kw.get('format_args', '').split():
             if arg[0] == '-':
                 try:
                     idx = int(arg[1:])
--- a/MoinMoin/parser/text_docbook.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/parser/text_docbook.py	Mon Jul 02 23:33:20 2007 +0200
@@ -56,7 +56,7 @@
         self.db_xsl = os.path.join(docbook_html_directory, 'docbook.xsl')
         self.db_compiled_xsl = os.path.join(docbook_html_directory, 'db_compiled.dat')
 
-        self.wikiParser = WikiParser(raw = self.raw, request = self.request, pretty_url=1)
+        self.wikiParser = WikiParser(raw=self.raw, request=self.request, pretty_url=1)
         self.key = 'docbook'
 
     def format(self, formatter):
@@ -112,7 +112,7 @@
                     found = re.search('alt="(?P<alt>.*?)"', splitResult[index])
                     if found:
                         imageAlt = found.group('alt')
-                    splitResult[index] = self.wikiParser.attachment( ('attachment:' + imageSrc, "") )
+                    splitResult[index] = self.wikiParser.attachment(('attachment:' + imageSrc, ""))
                     if imageAlt: # restore alt
                         splitResult[index] = re.sub('alt=".*?"', 'alt="%s"' % imageAlt, splitResult[index])
 
@@ -165,7 +165,7 @@
     from Ft.Lib import Uri
 
     # New docbook processor
-    db_processor=Processor()
+    db_processor = Processor()
 
     # Docbook Stylesheet
     my_sheet_uri = Uri.OsPathToUri(XSLT_FILE, 1)
--- a/MoinMoin/parser/text_html.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/parser/text_html.py	Mon Jul 02 23:33:20 2007 +0200
@@ -18,7 +18,7 @@
 
     extensions = ['.htm', '.html']
     Dependencies = Dependencies
-    
+
     def __init__(self, raw, request, **kw):
         self.raw = raw
         self.request = request
@@ -28,7 +28,7 @@
         try:
             self.request.write(formatter.rawHTML(Markup(self.raw).sanitize()))
         except HTMLParseError, e:
-            self.request.write(formatter.sysmsg(1) + 
+            self.request.write(formatter.sysmsg(1) +
                 formatter.text(u'HTML parsing error: %s in "%s"' % (e.msg,
                                   self.raw.splitlines()[e.lineno - 1].strip())) +
                 formatter.sysmsg(0))
--- a/MoinMoin/parser/text_irssi.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/parser/text_irssi.py	Mon Jul 02 23:33:20 2007 +0200
@@ -35,7 +35,7 @@
                     ((\d{1,4} [-/]?)+      # Date as one or more - or /-separated groups of digits (if it exists)
                      [T ])?                # Date/time separator: T or space
                     (\d?\d [:.]?)+         # Time as one or more :/.-separated groups of 1 or 2 digits (if it exists)
-                )  
+                )
             (\]|\))?\s+)?                  # Closing bracket or paren for the timestamp (if it exists) plus whitespace
         """
         std_pattern = re.compile(timestamp + r"""
@@ -61,7 +61,7 @@
             if code:
                 write(fmt.code(0))
             write(fmt.table_cell(0))
-          
+
         write(fmt.table(1))
         for line in lines:
             # maybe it's a standard line
--- a/MoinMoin/parser/text_moin_wiki.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/parser/text_moin_wiki.py	Mon Jul 02 23:33:20 2007 +0200
@@ -11,7 +11,7 @@
 import re
 from MoinMoin import config, wikiutil, macro
 
-Dependencies = ['user'] # {{{#!wiki comment ... }}} has different output depending on the user's profile settings 
+Dependencies = ['user'] # {{{#!wiki comment ... }}} has different output depending on the user's profile settings
 
 class Parser:
     """
@@ -112,7 +112,7 @@
         'word_rule': word_rule,
         'smiley': u'|'.join([re.escape(s) for s in config.smileys])}
 
-    # Don't start p before these 
+    # Don't start p before these
     no_new_p_before = ("heading rule table tableZ tr td "
                        "ul ol dl dt dd li li_none indent "
                        "macro parser pre")
@@ -882,8 +882,8 @@
         lastpos = 0
 
         ###result.append(u'<span class="info">[scan: <tt>"%s"</tt>]</span>' % line)
-        if line.count('{{{') > 1: 
-            self.in_nested_pre = line.count('{{{') -  line.count('}}}')
+        if line.count('{{{') > 1:
+            self.in_nested_pre = line.count('{{{') - line.count('}}}')
             if self.in_nested_pre == 0:
                 self.in_nested_pre = 1
             if line.startswith('{{{'):
@@ -896,8 +896,8 @@
             if lastpos < match.start():
 
                 ###result.append(u'<span class="info">[add text before match: <tt>"%s"</tt>]</span>' % line[lastpos:match.start()])
-                # self.no_862 is added to solve the issue of macros called inline 
-                if not (inhibit_p or self.inhibit_p or self.in_pre or self.formatter.in_p or self.no_862) :
+                # self.no_862 is added to solve the issue of macros called inline
+                if not (inhibit_p or self.inhibit_p or self.in_pre or self.formatter.in_p or self.no_862):
                     result.append(self.formatter.paragraph(1, css_class="line862"))
                 result.append(self.formatter.text(line[lastpos:match.start()]))
 
@@ -993,7 +993,7 @@
 
         # Main loop
         for line in self.lines:
-            if ']][[' in line.replace(' ',''):
+            if ']][[' in line.replace(' ', ''):
                 self.no_862 = True
 
             self.line_anchor_printed = 0
@@ -1034,10 +1034,10 @@
                         self.parser_name = parser_name
                         continue
                     else:
-                         if not line.count('{{{') > 1:
-                             self.request.write(self._closeP() +
-                                 self.formatter.preformatted(1))
-                         self.in_pre = 'no_parser'
+                        if not line.count('{{{') > 1:
+                            self.request.write(self._closeP() +
+                                self.formatter.preformatted(1))
+                        self.in_pre = 'no_parser'
 
                 if self.in_pre == 'found_parser':
                     self.in_nested_pre += line.count('{{{')
@@ -1125,7 +1125,7 @@
                 self.request.write(self._indent_to(indlen, indtype, numtype, numstart))
 
                 # Table mode
-                # TODO: move into function?                
+                # TODO: move into function?
                 if (not self.in_table and line[indlen:indlen + 2] == "||"
                     and line.endswith("|| ") and len(line) >= 5 + indlen):
                     # Start table
@@ -1162,7 +1162,7 @@
             self.request.write(formatted_line)
             if self.in_pre == 'no_parser':
                 self.request.write(self.formatter.linebreak())
-                
+
 
         # Close code displays, paragraphs, tables and open lists
         self.request.write(self._undent())
--- a/MoinMoin/parser/text_pascal.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/parser/text_pascal.py	Mon Jul 02 23:33:20 2007 +0200
@@ -22,7 +22,7 @@
 
     def setupRules(self):
         ParserBase.setupRules(self)
-        
+
         self.addRulePair("Comment", "\(\*", "\*\)")
         self.addRulePair("Comment", "\{", "\}")
         self.addRule("Comment", "//.*$")
@@ -31,7 +31,7 @@
         self.addRule("Number", r"[0-9](\.[0-9]*)?(eE[+-][0-9])?|\$[0-9a-fA-F]+")
         self.addRule("ID", "[a-zA-Z_][0-9a-zA-Z_]*")
         self.addRule("SPChar", r"[~!%^&*()+=|\[\]:;,.<>/?{}-]")
-        
+
         reserved_words = ['class', 'interface', 'set', 'uses', 'unit',
                           'byte', 'integer', 'longint', 'float', 'double',
                           'extended', 'char', 'shortint', 'boolean',
@@ -42,9 +42,9 @@
                           'try', 'except', 'finally', 'raise', 'continue', 'break',
                           'begin', 'end', 'type', 'class', 'implementation',
                           'procedure', 'function', 'constructor', 'destructor', 'program']
-        
+
         self.addReserved(reserved_words)
-        
+
         constant_words = ['true', 'false', 'nil']
-        
+
         self.addConstant(constant_words)
--- a/MoinMoin/parser/text_python.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/parser/text_python.py	Mon Jul 02 23:33:20 2007 +0200
@@ -42,7 +42,7 @@
         self.form = request.form
         self._ = request.getText
 
-        self.show_num, self.num_start, self.num_step, attrs = parse_start_step(request, kw.get('format_args',''))
+        self.show_num, self.num_start, self.num_step, attrs = parse_start_step(request, kw.get('format_args', ''))
 
     def format(self, formatter):
         """ Parse and send the colored source.
@@ -63,7 +63,7 @@
         self.formatter = formatter
         self.request.write(formatter.code_line(1))
         #len('%d' % (len(self.lines)-1, )))
-        
+
         # parse the source and write it
         self.pos = 0
         text = StringIO.StringIO(self.raw)
@@ -72,7 +72,7 @@
         except tokenize.TokenError, ex:
             msg = ex[0]
             line = ex[1][0]
-            errmsg = (self.formatter.linebreak() + 
+            errmsg = (self.formatter.linebreak() +
                       self.formatter.strong(1) + "ERROR: %s" % msg + self.formatter.strong(0) +
                       self.formatter.linebreak() +
                       wikiutil.escape(self.raw[self.lines[line]:]))
--- a/MoinMoin/parser/text_rst.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/parser/text_rst.py	Mon Jul 02 23:33:20 2007 +0200
@@ -62,7 +62,7 @@
         def __init__(self, raw, request, **kw):
             self.raw = raw
             self.request = request
-    
+
         def format(self, formatter):
             _ = self.request.getText
             from MoinMoin.parser.text import Parser as TextParser
@@ -70,7 +70,7 @@
                                formatter.rawHTML(_('Rendering of reStructured text is not possible, please install Docutils.')) +
                                formatter.sysmsg(0))
             TextParser(self.raw, self.request).format(formatter)
-    
+
     # Create a pseudo docutils environment
     docutils = html4css1 = dummyUrllib2()
     html4css1.HTMLTranslator = html4css1.Writer = object
@@ -90,7 +90,7 @@
         sys.modules[i].open = dummyOpen
         sys.modules[i].urllib2 = dummyUrllib2
         sys.modules[i].__import__ = safe_import
-        
+
 # --- End of dummy-code --------------------------------------------------------
 
 def html_escape_unicode(node):
@@ -104,7 +104,7 @@
 class MoinWriter(html4css1.Writer):
 
     config_section = 'MoinMoin writer'
-    config_section_dependencies = ('writers',)
+    config_section_dependencies = ('writers', )
 
     #"""Final translated form of `document`."""
     output = None
@@ -162,7 +162,7 @@
                                  self)
         self.document.walkabout(visitor)
         self.visitor = visitor
-        # Docutils 0.5 and later require the writer to have the visitor 
+        # Docutils 0.5 and later require the writer to have the visitor
         # attributes.
         if (hasattr(html4css1.Writer, 'visitor_attributes')):
             for attr in html4css1.Writer.visitor_attributes:
@@ -183,9 +183,9 @@
         parser = MoinDirectives(self.request)
 
         parts = publish_parts(
-            source = self.raw,
-            writer = MoinWriter(formatter, self.request),
-            settings_overrides = {
+            source=self.raw,
+            writer=MoinWriter(formatter, self.request),
+            settings_overrides={
                 'halt_level': 5,
                 'traceback': True,
                 'file_insertion_enabled': 0,
@@ -213,14 +213,14 @@
 class RawHTMLList(list):
     """
         RawHTMLList catches all html appended to internal HTMLTranslator lists.
-        It passes the HTML through the MoinMoin rawHTML formatter to strip 
+        It passes the HTML through the MoinMoin rawHTML formatter to strip
         markup when necessary. This is to support other formatting outputs
         (such as ?action=show&mimetype=text/plain).
     """
-    
+
     def __init__(self, formatter):
         self.formatter = formatter
-        
+
     def append(self, text):
         f = sys._getframe()
         if f.f_back.f_code.co_filename.endswith('html4css1.py'):
@@ -249,7 +249,7 @@
         self.wiki_text = ''
         self.setup_wiki_handlers()
         self.setup_admonitions_handlers()
-        
+
         # Make all internal lists RawHTMLLists, see RawHTMLList class
         # comment for more information.
         for i in self.__dict__:
@@ -335,16 +335,16 @@
             link = refuri
             if ':' in refuri:
                 prefix, link = refuri.lstrip().split(':', 1)
-            
+
             # First see if MoinMoin should handle completely. Exits through add_wiki_markup.
-            if ((refuri.startswith('[[') and refuri.endswith(']]')) or 
+            if ((refuri.startswith('[[') and refuri.endswith(']]')) or
                     (prefix == 'drawing') or
                     (prefix == 'inline')):
                 self.process_wiki_text(refuri)
                 self.wiki_text = self.fixup_wiki_formatting(self.wiki_text)
                 self.add_wiki_markup()
 
-            # From here down, all links are handled by docutils (except 
+            # From here down, all links are handled by docutils (except
             # missing attachments), just fixup node['refuri'].
             if prefix == 'attachment':
                 if not AttachFile.exists(self.request, self.request.page.page_name, link):
@@ -353,10 +353,10 @@
                     self.wiki_text = self.fixup_wiki_formatting(self.wiki_text)
                     self.add_wiki_markup()
                 # Attachment exists, just get a link to it.
-                node['refuri'] = AttachFile.getAttachUrl(self.request.page.page_name, 
+                node['refuri'] = AttachFile.getAttachUrl(self.request.page.page_name,
                         link, self.request)
                 if not [i for i in node.children if i.__class__ == docutils.nodes.image]:
-                    node['classes'].append(prefix)                
+                    node['classes'].append(prefix)
             elif prefix == 'wiki':
                 wikitag, wikiurl, wikitail, err = wikiutil.resolve_wiki(self.request, link)
                 wikiurl = wikiutil.mapURL(self.request, wikiurl)
@@ -368,8 +368,8 @@
                     node['classes'].append('interwiki')
             elif prefix != '':
                 # Some link scheme (http, file, https, mailto, etc.), add class
-                # information if the reference doesn't have a child image (don't 
-                # want additional markup for images with targets). 
+                # information if the reference doesn't have a child image (don't
+                # want additional markup for images with targets).
                 # Don't touch the refuri.
                 if not [i for i in node.children if i.__class__ == docutils.nodes.image]:
                     node['classes'].append(prefix)
@@ -412,8 +412,8 @@
                 self.add_wiki_markup()
             # Attachment exists, get a link to it.
             # create the url
-            node['uri'] = AttachFile.getAttachUrl(self.request.page.page_name, 
-                    attach_name, self.request, addts = 1)
+            node['uri'] = AttachFile.getAttachUrl(self.request.page.page_name,
+                    attach_name, self.request, addts=1)
             if not node.hasattr('alt'):
                 node['alt'] = node.get('name', uri)
         html4css1.HTMLTranslator.visit_image(self, node)
@@ -450,7 +450,7 @@
             'literal_block': 'preformatted',
             # Simple Lists
             # bullet-lists are handled completely by docutils because it uses
-            # the node context to decide when to make a compact list 
+            # the node context to decide when to make a compact list
             # (no <p> tags).
             'list_item': 'listitem',
             # Definition List
@@ -487,8 +487,8 @@
             self.wiki_text = ''
             self.request.write(self.formatter.div(0))
             self.body.append(self.wiki_text)
-            
-        return visit_func, depart_func 
+
+        return visit_func, depart_func
 
     def setup_admonitions_handlers(self):
         """
@@ -560,7 +560,7 @@
             return
 
         if len(content):
-            page = Page(page_name = content[0], request = self.request)
+            page = Page(page_name=content[0], request=self.request)
             if page.exists():
                 text = page.get_raw_body()
                 lines = text.split('\n')
@@ -568,7 +568,7 @@
                 if lines[0].startswith("#format"):
                     del lines[0]
             else:
-                lines = [_("**Could not find the referenced page: %s**") % (content[0],)]
+                lines = [_("**Could not find the referenced page: %s**") % (content[0], )]
             # Insert the text from the included document and then continue
             # parsing
             state_machine.insert_input(lines, 'MoinDirectives')
@@ -594,7 +594,7 @@
                 macro = content[0]
             else:
                 macro = '[[%s]]' % content[0]
-            ref = reference(macro, refuri = macro)
+            ref = reference(macro, refuri=macro)
             ref['name'] = macro
             return [ref]
         return
--- a/MoinMoin/parser/text_xslt.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/parser/text_xslt.py	Mon Jul 02 23:33:20 2007 +0200
@@ -82,7 +82,7 @@
                 # setting up vars for xslt Processor
                 out_file = StringIO.StringIO()
                 wiki_resolver = MoinResolver(
-                                    handlers={self.base_scheme: self._resolve_page,},
+                                    handlers={self.base_scheme: self._resolve_page, },
                                     base_scheme=self.base_scheme)
                 input_factory = InputSource.InputSourceFactory(resolver=wiki_resolver)
 
--- a/MoinMoin/request/CLI.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/request/CLI.py	Mon Jul 02 23:33:20 2007 +0200
@@ -70,7 +70,7 @@
 
     def getQualifiedURL(self, uri=None):
         """ Return a full URL starting with schema and host
-        
+
         TODO: does this create correct pages when you render wiki pages
               within a cli request?!
         """
@@ -86,8 +86,8 @@
         pass
 
     def http_redirect(self, url):
-        """ Redirect to a fully qualified, or server-rooted URL 
-        
+        """ Redirect to a fully qualified, or server-rooted URL
+
         TODO: Does this work for rendering redirect pages?
         """
         raise Exception("Redirect not supported for command line tools!")
--- a/MoinMoin/request/MODPYTHON.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/request/MODPYTHON.py	Mon Jul 02 23:33:20 2007 +0200
@@ -41,11 +41,11 @@
     def fixURI(self, env):
         """ Fix problems with script_name and path_info using
         PythonOption directive to rewrite URI.
-        
+
         This is needed when using Apache 1 or other server which does
         not support adding custom headers per request. With mod_python we
         can use the PythonOption directive:
-        
+
             <Location /url/to/mywiki/>
                 PythonOption X-Moin-Location /url/to/mywiki/
             </location>
@@ -54,7 +54,7 @@
         when Moin is invoked as a mod_python handler with apache1, so we
         must build both using request_uri and the provided PythonOption.
         """
-        # Be compatible with release 1.3.5 "Location" option 
+        # Be compatible with release 1.3.5 "Location" option
         # TODO: Remove in later release, we should have one option only.
         old_location = 'Location'
         options_table = self.mpyreq.get_options()
@@ -75,8 +75,8 @@
         RequestBase.fixURI(self, env)
 
     def _setup_args_from_cgi_form(self):
-        """ Override to use mod_python.util.FieldStorage 
-        
+        """ Override to use mod_python.util.FieldStorage
+
         It's little different from cgi.FieldStorage, so we need to
         duplicate the conversion code.
         """
--- a/MoinMoin/request/STANDALONE.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/request/STANDALONE.py	Mon Jul 02 23:33:20 2007 +0200
@@ -35,14 +35,14 @@
             self.if_modified_since = sa.headers.getheader('if-modified-since')
             self.if_none_match = sa.headers.getheader('if-none-match')
 
-            # Copy rest from standalone request   
+            # Copy rest from standalone request
             self.server_name = sa.server.server_name
             self.server_port = str(sa.server.server_port)
             self.request_method = sa.command
             self.request_uri = sa.path
             self.remote_addr = sa.client_address[0]
 
-            # Values that need more work                        
+            # Values that need more work
             self.path_info, self.query_string = self.splitURI(sa.path)
             self.setHttpReferer(sa.headers.getheader('referer'))
             self.setHost(sa.headers.getheader('host'))
@@ -62,9 +62,9 @@
 
     def read(self, n=None):
         """ Read from input stream
-        
+
         Since self.rfile.read() will block, content-length will be used instead.
-        
+
         TODO: test with n > content length, or when calling several times
         with smaller n but total over content length.
         """
--- a/MoinMoin/request/TWISTED.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/request/TWISTED.py	Mon Jul 02 23:33:20 2007 +0200
@@ -65,8 +65,8 @@
         RequestBase.run(self)
 
     def setup_args(self):
-        """ Return args dict 
-        
+        """ Return args dict
+
         Twisted already parsed args, including __filename__ hacking,
         but did not decode the values.
         """
@@ -119,8 +119,8 @@
                 self.twistd.setHeader(key, value)
 
     def http_redirect(self, url):
-        """ Redirect to a fully qualified, or server-rooted URL 
-        
+        """ Redirect to a fully qualified, or server-rooted URL
+
         @param url: relative or absolute url, ascii using url encoding.
         """
         url = self.getQualifiedURL(url)
--- a/MoinMoin/request/__init__.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/request/__init__.py	Mon Jul 02 23:33:20 2007 +0200
@@ -110,8 +110,8 @@
 
 def cgiMetaVariable(header, scheme='http'):
     """ Return CGI meta variable for header name
-    
-    e.g 'User-Agent' -> 'HTTP_USER_AGENT'    
+
+    e.g 'User-Agent' -> 'HTTP_USER_AGENT'
     See http://www.faqs.org/rfcs/rfc3875.html section 4.1.18
     """
     var = '%s_%s' % (scheme, header)
@@ -273,7 +273,7 @@
         limits = self.cfg.surge_action_limits
         if not limits:
             return False
-                                    
+
         validuser = self.user.valid
         current_id = validuser and self.user.name or self.remote_addr
         if not validuser and current_id.startswith('127.'): # localnet
@@ -370,8 +370,8 @@
     def setAcceptedCharsets(self, accept_charset):
         """ Set accepted_charsets by parsing accept-charset header
 
-        Set self.accepted_charsets to an ordered list based on http_accept_charset. 
-        
+        Set self.accepted_charsets to an ordered list based on http_accept_charset.
+
         Reference: http://www.w3.org/Protocols/rfc2616/rfc2616.txt
 
         TODO: currently no code use this value.
@@ -387,7 +387,7 @@
                 accept_charset += ',iso-8859-1'
 
             # Make a list, sorted by quality value, using Schwartzian Transform
-            # Create list of tuples (value, name) , sort, extract names  
+            # Create list of tuples (value, name) , sort, extract names
             for item in accept_charset.split(','):
                 if ';' in item:
                     name, qval = item.split(';')
@@ -403,7 +403,7 @@
 
     def _setup_vars_from_std_env(self, env):
         """ Set common request variables from CGI environment
-        
+
         Parse a standard CGI environment as created by common web servers.
         Reference: http://www.faqs.org/rfcs/rfc3875.html
 
@@ -437,7 +437,7 @@
 
     def setHttpReferer(self, referer):
         """ Set http_referer, making sure its ascii
-        
+
         IE might send non-ascii value.
         """
         value = ''
@@ -447,8 +447,8 @@
         self.http_referer = value
 
     def setIsSSL(self, env):
-        """ Set is_ssl 
-        
+        """ Set is_ssl
+
         @param env: dict like object containing cgi meta variables
         """
         self.is_ssl = bool(env.get('SSL_PROTOCOL') or
@@ -456,8 +456,8 @@
                            env.get('HTTPS') == 'on')
 
     def setHost(self, host=None):
-        """ Set http_host 
-        
+        """ Set http_host
+
         Create from server name and port if missing. Previous code
         default to localhost.
         """
@@ -471,12 +471,12 @@
 
     def fixURI(self, env):
         """ Fix problems with script_name and path_info
-        
+
         Handle the strange charset semantics on Windows and other non
         posix systems. path_info is transformed into the system code
         page by the web server. Additionally, paths containing dots let
         most webservers choke.
-        
+
         Broken environment variables in different environments:
                 path_info script_name
         Apache1     X          X      PI does not contain dots
@@ -511,10 +511,10 @@
                 self.path_info = self.path_info[len(self.script_name):]
 
     def setURL(self, env):
-        """ Set url, used to locate wiki config 
-        
+        """ Set url, used to locate wiki config
+
         This is the place to manipulate url parts as needed.
-        
+
         @param env: dict like object containing cgi meta variables or http headers.
         """
         # If we serve on localhost:8000 and use a proxy on
@@ -529,16 +529,16 @@
 
     def rewriteHost(self, env):
         """ Rewrite http_host transparently
-        
+
         Get the proxy host using 'X-Forwarded-Host' header, added by
         Apache 2 and other proxy software.
-        
+
         TODO: Will not work for Apache 1 or others that don't add this header.
-        
+
         TODO: If we want to add an option to disable this feature it
         should be in the server script, because the config is not
         loaded at this point, and must be loaded after url is set.
-        
+
         @param env: dict like object containing cgi meta variables or http headers.
         """
         proxy_host = (env.get(self.proxy_host) or
@@ -548,7 +548,7 @@
 
     def rewriteURI(self, env):
         """ Rewrite request_uri, script_name and path_info transparently
-        
+
         Useful when running mod python or when running behind a proxy,
         e.g run on localhost:8000/ and serve as example.com/wiki/.
 
@@ -559,10 +559,10 @@
             <Location /my/wiki/>
                 RequestHeader set X-Moin-Location /my/wiki/
             </location>
-        
+
         TODO: does not work for Apache 1 and others that do not allow
         setting custom headers per request.
-        
+
         @param env: dict like object containing cgi meta variables or http headers.
         """
         location = (env.get(self.moin_location) or
@@ -591,7 +591,7 @@
 
     def splitURI(self, uri):
         """ Return path and query splited from uri
-        
+
         Just like CGI environment, the path is unquoted, the query is not.
         """
         if '?' in uri:
@@ -666,7 +666,7 @@
 
         self._login_messages = login_msgs
         return user_obj
-    
+
     def handle_jid_auth(self, jid):
         return user.get_by_jabber_id(self, jid)
 
@@ -765,7 +765,7 @@
         """ Create a dict of avaiable actions
 
         Return cached version if avaiable.
-       
+
         @rtype: dict
         @return: dict of all known actions
         """
@@ -865,7 +865,7 @@
             if total_secs > 50:
                 indicator += '!4!'
             elif total_secs > 20:
-               indicator += '!3!'
+                indicator += '!3!'
             elif total_secs > 10:
                 indicator += '!2!'
             elif total_secs > 2:
@@ -915,7 +915,7 @@
         an existing page.
 
         See http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.2.1
-        
+
         @param name: page name, string
         @rtype: unicode
         @return decoded page name
@@ -944,14 +944,14 @@
         return name
 
     def normalizePagename(self, name):
-        """ Normalize page name 
+        """ Normalize page name
 
         Prevent creating page names with invisible characters or funny
         whitespace that might confuse the users or abuse the wiki, or
         just does not make sense.
 
         Restrict even more group pages, so they can be used inside acl lines.
-        
+
         @param name: page name, unicode
         @rtype: unicode
         @return: decoded and sanitized page name
@@ -973,7 +973,7 @@
                 page = u''.join([c for c in page
                                  if c.isalnum() or c.isspace()])
 
-            # Normalize white space. Each name can contain multiple 
+            # Normalize white space. Each name can contain multiple
             # words separated with only one space. Split handle all
             # 30 unicode spaces (isspace() == True)
             page = u' '.join(page.split())
@@ -1029,7 +1029,7 @@
         return forbidden
 
     def setup_args(self):
-        """ Return args dict 
+        """ Return args dict
         First, we parse the query string (usually this is used in GET methods,
         but TwikiDraw uses ?action=AttachFile&do=savedrawing plus posted stuff).
         Second, we update what we got in first step by the stuff we get from
@@ -1071,8 +1071,8 @@
         return self.decodeArgs(args)
 
     def decodeArgs(self, args):
-        """ Decode args dict 
-        
+        """ Decode args dict
+
         Decoding is done in a separate path because it is reused by
         other methods and sub classes.
         """
@@ -1279,7 +1279,7 @@
 
     def http_redirect(self, url):
         """ Redirect to a fully qualified, or server-rooted URL
-        
+
         @param url: relative or absolute url, ascii using url encoding.
         """
         url = self.getQualifiedURL(url)
@@ -1292,7 +1292,7 @@
             Encodes to ASCII if it gets unicode headers.
             Make sure we have exactly one Content-Type and one Status header.
             Make sure Status header string begins with a integer number.
-        
+
             For emitting, it calls the server specific _emit_http_headers
             method.
 
@@ -1349,7 +1349,7 @@
 
     def _emit_http_headers(self, headers):
         """ server specific method to emit http headers.
-        
+
             @param headers: a list of http header strings in this FIXED order:
                 1. status header (always present and valid, e.g. "200 OK")
                 2. content type header (always present)
@@ -1359,7 +1359,7 @@
 
     def setHttpHeader(self, header):
         """ Save header for later send.
-        
+
             Attention: although we use a list here, some implementations use a dict,
             thus multiple calls with the same header type do NOT work in the end!
         """
@@ -1368,14 +1368,14 @@
     def fail(self, err):
         """ Fail when we can't continue
 
-        Send 500 status code with the error name. Reference: 
+        Send 500 status code with the error name. Reference:
         http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.1.1
 
-        Log the error, then let failure module handle it. 
+        Log the error, then let failure module handle it.
 
         @param err: Exception instance or subclass.
         """
-        self.failed = 1 # save state for self.run()            
+        self.failed = 1 # save state for self.run()
         # we should not generate the headers two times
         if not getattr(self, 'sent_headers', 0):
             self.emit_http_headers(['Status: 500 MoinMoin Internal Error'])
@@ -1450,7 +1450,7 @@
         share the same caching proxy.
 
         AVOID using no-cache and no-store for attachments as it is completely broken on IE!
-        
+
         Details: http://support.microsoft.com/support/kb/articles/Q234/0/67.ASP
         """
         if level <= self.http_caching_disabled:
@@ -1479,7 +1479,7 @@
 
     def finish(self):
         """ General cleanup on end of request
-        
+
         Delete circular references - all object that we create using self.name = class(self).
         This helps Python to collect these objects and keep our memory footprint lower.
         """
--- a/MoinMoin/request/_tests/test_request.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/request/_tests/test_request.py	Mon Jul 02 23:33:20 2007 +0200
@@ -86,7 +86,7 @@
 
     def testNormalizeGroupName(self):
         """ request: normalize pagename: restrict groups to alpha numeric Unicode
-        
+
         Spaces should normalize after invalid chars removed!
         """
         import re
--- a/MoinMoin/script/__init__.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/__init__.py	Mon Jul 02 23:33:20 2007 +0200
@@ -147,7 +147,7 @@
     def logRuntime(self):
         """ Print the total command run time. """
         if self.options.show_timing:
-            log("Needed %.3f secs." % (time.clock() - _start_time,))
+            log("Needed %.3f secs." % (time.clock() - _start_time, ))
 
 
 class MoinScript(Script):
@@ -191,7 +191,7 @@
         if len(args) < 2:
             self.parser.print_help()
             fatal("""You must specify a command module and name:
-            
+
 moin ... account check ...
 moin ... account create ...
 moin ... account disable ...
@@ -224,7 +224,7 @@
     --wiki-url=wiki.example.org/
         Mandatory for most commands and specifies the url of the wiki you like
         to operate on.
-        
+
 Specific options:
     Most commands need additional parameters after command subcommand.
 
--- a/MoinMoin/script/account/check.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/account/check.py	Mon Jul 02 23:33:20 2007 +0200
@@ -21,15 +21,15 @@
     =====================
 
     General syntax: moin [options] account check [check-options]
-    
+
     [options] usually should be:
         --config-dir=/path/to/my/cfg/ --wiki-url=wiki.example.org/
-    
+
     [check-options] see below:
-    
+
     0. Check the settings at top of the code!
        Making a backup of your wiki might be also a great idea.
-       
+
     1. Best is to first look at duplicate user names:
        moin ... account check --usersunique
 
@@ -47,11 +47,11 @@
 
     4. After cleaning up, do 1. and 2. again. There should be no output now, if
        everything is OK.
-       
+
     5. Optionally you may want to make wikinames out of the user names
        moin ... account check --wikinames
        moin ... account check --wikinames --save
-        
+
 """
 
 # ----------------------------------------------------------------------------
--- a/MoinMoin/script/export/dump.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/export/dump.py	Mon Jul 02 23:33:20 2007 +0200
@@ -147,7 +147,7 @@
             script.log('Writing "%s"...' % file)
             try:
                 pagehtml = ''
-                request.url = urlbase + pagename # add current pagename to url base 
+                request.url = urlbase + pagename # add current pagename to url base
                 page = Page.Page(request, pagename)
                 request.page = page
                 try:
--- a/MoinMoin/script/import/irclog.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/import/irclog.py	Mon Jul 02 23:33:20 2007 +0200
@@ -9,7 +9,7 @@
 
     Usage:
     moin --config-dir=... --wiki-url=... import irclog --author=IrcLogImporter --file-dir=.
-    
+
     @copyright: 2005-2007 MoinMoin:AlexanderSchremmer
                 2006 MoinMoin:ThomasWaldmann
     @license: GNU GPL, see COPYING for details.
@@ -64,7 +64,7 @@
         request.cfg.mail_enabled = False
         for root, dirs, files in os.walk(self.options.file_dir):
             files.sort()
-            for filename in files: 
+            for filename in files:
                 pagename = self.options.page + filename_function(filename)
                 #print "Pushing %r as %r" % (filename, pagename)
                 p = PageEditor(request, pagename, do_editor_backup=0, uid_override=self.options.author, do_revision_backup=0)
--- a/MoinMoin/script/maint/cleancache.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/maint/cleancache.py	Mon Jul 02 23:33:20 2007 +0200
@@ -3,12 +3,12 @@
     MoinMoin - cleancache script
 
     globally delete cache files in data/pages/PageName/cache/ directories
-    
+
     You will usually do this after changing MoinMoin code, by either upgrading
     version, installing or removing macros. This often makes the text_html
     files invalid, so you have to remove them (the wiki will recreate them
     automatically).
-    
+
     text_html is the name of the cache file used for compiled pages formatted
     by the wiki text to html formatter,
 
--- a/MoinMoin/script/maint/cleanpage.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/maint/cleanpage.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,7 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 """
     MoinMoin - display unused or trash page directories in data/pages
-    
+
     Then please review the output before running it!
 
     @copyright: 2005-2006 MoinMoin:ThomasWaldmann
--- a/MoinMoin/script/maint/globaledit.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/maint/globaledit.py	Mon Jul 02 23:33:20 2007 +0200
@@ -5,7 +5,7 @@
     The changes being done are hardcoded in function do_edit.
     As it is, this script is mostly useful for the MoinMoin release maintainer
     using: moin ... --wiki-url=moinmaster.wikiwikiweb.de/ maint globaledit
-    
+
     @copyright: 2004-2006 MoinMoin:ThomasWaldmann
     @license: GNU GPL, see COPYING for details.
 """
--- a/MoinMoin/script/maint/reducewiki.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/maint/reducewiki.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,16 +1,16 @@
 # -*- coding: iso-8859-1 -*-
 """
     MoinMoin - reducewiki script
-    
+
     Use this script to reduce a data/ directory to the latest page revision of
     each non-deleted page (plus all attachments).
-    
+
     This is used to make the distributed underlay directory, but can also be
     used for other purposes.
 
     Usage: moin ... maint reducewiki --target-dir=myunderlay
-    
-    So we change like this:      
+
+    So we change like this:
         * data/pages/PageName/revisions/{1,2,3,4}
           -> data/pages/revisions/1  (with content of 4)
         * data/pages/PageName/current (pointing to e.g. 4)
--- a/MoinMoin/script/migration/data.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/migration/data.py	Mon Jul 02 23:33:20 2007 +0200
@@ -12,7 +12,7 @@
     Important: you must have run all 12_to_13* and the final 152_to_1050300
                mig scripts ONCE and in correct order manually before attempting
                to use the new style migration stuff.
-               
+
     @copyright: 2006 MoinMoin:ThomasWaldmann
     @license: GNU GPL, see COPYING for details.
 """
--- a/MoinMoin/script/migration/wikimarkup_converter.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/migration/wikimarkup_converter.py	Mon Jul 02 23:33:20 2007 +0200
@@ -622,7 +622,7 @@
     # SCANNING ---------------------------------------------------------------
     def scan(self, scan_re, line):
         """ Scans one line
-        
+
         Append text before match, invoke replace() with match, and add text after match.
         """
         result = []
@@ -756,7 +756,7 @@
                 self.request.write(self._indent_to(indlen, indtype, numtype, numstart))
 
                 # Table mode
-                # TODO: move into function?                
+                # TODO: move into function?
                 if (not self.in_table and line[indlen:indlen + 2] == "||"
                     and line.endswith("|| ") and len(line) >= 5 + indlen):
                     # Start table
--- a/MoinMoin/script/moin.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/moin.py	Mon Jul 02 23:33:20 2007 +0200
@@ -5,7 +5,7 @@
     a sub-command.
 
     Usage: moin cmdmodule cmdname [options]
-               
+
     @copyright: 2006 MoinMoin:ThomasWaldmann
     @license: GNU GPL, see COPYING for details.
 """
--- a/MoinMoin/script/old/migration/12_to_13_mig01.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/migration/12_to_13_mig01.py	Mon Jul 02 23:33:20 2007 +0200
@@ -62,7 +62,7 @@
 def unquoteFilename12(filename, encoding):
     """
     Return decoded original filename when given an encoded filename.
-    
+
     @param filename: encoded filename
     @rtype: string
     @return: decoded, original filename
@@ -83,7 +83,7 @@
     except UnicodeDecodeError: # try again with iso
         newstr = str.decode('iso-8859-1')
     return newstr.encode(enc_to)
-    
+
 def qf_convert_string(str, enc_from, enc_to):
     str = unquoteWikiname12(str, enc_from)
     str = wikiutil.quoteWikinameFS(str, enc_to)
@@ -99,14 +99,14 @@
         file_to.write(convert_string(line, enc_from, enc_to))
     file_to.close()
     file_from.close()
-    st=os.stat(fname_from)
-    os.utime(fname_to, (st.st_atime,st.st_mtime))
+    st = os.stat(fname_from)
+    os.utime(fname_to, (st.st_atime, st.st_mtime))
 
 def convert_textdir(dir_from, dir_to, enc_from, enc_to, is_backupdir=0):
     os.mkdir(dir_to)
     for fname_from in listdir(dir_from):
         if is_backupdir:
-            fname, timestamp = fname_from.split('.',1)
+            fname, timestamp = fname_from.split('.', 1)
             timestamp = str(wikiutil.timestamp2version(float(timestamp)))
         else:
             fname = fname_from
@@ -115,7 +115,7 @@
             fname_to = '.'.join([fname, timestamp])
         else:
             fname_to = fname
-        convert_file(opj(dir_from, fname_from), opj( dir_to, fname_to),
+        convert_file(opj(dir_from, fname_from), opj(dir_to, fname_to),
                      enc_from, enc_to)
 
 def convert_pagedir(dir_from, dir_to, enc_from, enc_to):
@@ -141,8 +141,8 @@
         file_from = open(log_from)
         file_to = open(log_to, "w")
         for line in file_from:
-            line = line.replace('\r','')
-            line = line.replace('\n','')
+            line = line.replace('\r', '')
+            line = line.replace('\n', '')
             if not line.strip(): # skip empty lines
                 continue
             fields = line.split('\t')
--- a/MoinMoin/script/old/migration/12_to_13_mig02.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/migration/12_to_13_mig02.py	Mon Jul 02 23:33:20 2007 +0200
@@ -3,7 +3,7 @@
     migration from moin 1.3 < patch-78 to moin 1.3 >= patch-78
     * switch quoting mechanism from (xx)(xx) to (xxxx)
     * charset isn't changed, it was utf-8 before and will be utf-8 after
-    
+
     Steps for a successful migration:
         1. stop your wiki and make a backup
         2. make a copy of the wiki's "data" directory to your working dir
@@ -41,7 +41,7 @@
 from MoinMoin.script.migration.migutil import opj, listdir, copy_file, copy_dir
 
 # this is a copy of the wikiutil.unquoteWikiname of moin--main--1.3--patch-77
-def unquoteWikinameOld(filename, charsets=[from_encoding,]):
+def unquoteWikinameOld(filename, charsets=[from_encoding, ]):
     """
     Return decoded original filename when given an encoded filename.
     @param filename: encoded filename
@@ -60,11 +60,11 @@
             close = filename[i+3]
             if close != ')':
                 raise Exception('filename encoding invalid')
-            i+=4
-            fn = fn + chr( 16 * int(c1,16) + int(c2, 16) )
+            i += 4
+            fn = fn + chr(16 * int(c1, 16) + int(c2, 16))
         else:
             fn = fn + c
-            i+=1
+            i += 1
     return wikiutil.decodeUserInput(fn, charsets)
 
 
@@ -73,13 +73,13 @@
 
 
 def qf_convert_string(str, enc_from, enc_to):
-    """ Convert filename from pre patch 78 quoting to new quoting 
-    
-    The old quoting function from patch 77 can convert name ONLY from 
-    the old way to the new, so if you have a partially converted 
-    directory, as it the situation as of moin--main--1.3--patch-86, 
+    """ Convert filename from pre patch 78 quoting to new quoting
+
+    The old quoting function from patch 77 can convert name ONLY from
+    the old way to the new, so if you have a partially converted
+    directory, as it the situation as of moin--main--1.3--patch-86,
     it does not work.
-    
+
     The new unquoting function is backward compatible, and can unquote
     both post and pre patch 78 file names.
     """
@@ -96,8 +96,8 @@
         file_to.write(convert_string(line, enc_from, enc_to))
     file_to.close()
     file_from.close()
-    st=os.stat(fname_from)
-    os.utime(fname_to, (st.st_atime,st.st_mtime))
+    st = os.stat(fname_from)
+    os.utime(fname_to, (st.st_atime, st.st_mtime))
 
 
 def convert_textdir(dir_from, dir_to, enc_from, enc_to, is_backupdir=0):
--- a/MoinMoin/script/old/migration/12_to_13_mig03.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/migration/12_to_13_mig03.py	Mon Jul 02 23:33:20 2007 +0200
@@ -15,7 +15,7 @@
     * data/cache/pagelinks/PageName -> data/pages/PageName/cache/pagelinks
     * data/cache/charts/hitcounts-PageName -> data/pages/PageName/cache/hitcounts
 
-    
+
     Steps for a successful migration:
 
         1. Stop your wiki and make a backup of old data and code
@@ -90,7 +90,7 @@
 def convert_pagedir(dir_from, dir_to):
     os.mkdir(dir_to)
     for dname_from in listdir(dir_from):
-        print "%s" % (dname_from,)
+        print "%s" % (dname_from, )
         dname_to = dname_from
         shutil.copytree(opj(dir_from, dname_from), opj(dir_to, dname_to), 1)
         try:
@@ -105,11 +105,11 @@
         timestamp = data[2]
         data[2] = str(long(float(timestamp))) # we only want integer (must be long for py 2.2.x)
         data = '\t'.join(data)
-        
+
         f = open(file_to, 'a')
         f.write(data)
         f.close()
-        
+
         try:
             file_to2 = opj(dir_to, pagename, 'edit-log')
             f = open(file_to2, 'a')
@@ -127,7 +127,7 @@
 
 convert_pagedir(opj(origdir, 'pages'), opj('data', 'pages'))
 
-convert_textdir(opj(origdir,'text'), 'data')
+convert_textdir(opj(origdir, 'text'), 'data')
 
 convert_textdir(opj(origdir, 'backup'), 'data', 1)
 
--- a/MoinMoin/script/old/migration/12_to_13_mig04.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/migration/12_to_13_mig04.py	Mon Jul 02 23:33:20 2007 +0200
@@ -6,7 +6,7 @@
     * data/user/<uid>.bookmark -> convert to usecs
     * data/edit-log and data/pages/PageName/edit-log -> convert to usecs
     * data/event-log -> convert to usecs
-    
+
     Steps for a successful migration:
 
         1. Stop your wiki and make a backup of old data and code
@@ -55,7 +55,7 @@
     return long(ts_to) # must be long for py 2.2.x
 
 def convert_eventlog(file_from, file_to):
-    if not os.path.exists(file_from): 
+    if not os.path.exists(file_from):
         return
     f = open(file_to, 'a')
     for l in open(file_from):
@@ -66,9 +66,9 @@
         data = '\t'.join(data)
         f.write(data)
     f.close()
-        
+
 def convert_editlog(file_from, file_to):
-    if not os.path.exists(file_from): 
+    if not os.path.exists(file_from):
         return
     f = open(file_to, 'a')
     for l in open(file_from):
@@ -79,7 +79,7 @@
         data = '\t'.join(data)
         f.write(data)
     f.close()
-        
+
 def convert_pagedir(dir_from, dir_to, is_backupdir=0):
     os.mkdir(dir_to)
     for pagedir in listdir(dir_from):
@@ -87,7 +87,7 @@
         text_to = opj(dir_to, pagedir, 'text')
         os.mkdir(opj(dir_to, pagedir))
         copy_file(text_from, text_to)
-        
+
         backupdir_from = opj(dir_from, pagedir, 'backup')
         backupdir_to = opj(dir_to, pagedir, 'backup')
         if os.path.exists(backupdir_from):
@@ -97,11 +97,11 @@
                 backup_from = opj(backupdir_from, ts)
                 backup_to = opj(backupdir_to, ts_usec)
                 copy_file(backup_from, backup_to)
-        
+
         editlog_from = opj(dir_from, pagedir, 'edit-log')
         editlog_to = opj(dir_to, pagedir, 'edit-log')
         convert_editlog(editlog_from, editlog_to)
-        
+
         #cachedir_from = opj(dir_from, pagedir, 'cache')
         #cachedir_to = opj(dir_to, pagedir, 'cache')
         #if os.path.exists(cachedir_from):
--- a/MoinMoin/script/old/migration/12_to_13_mig05.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/migration/12_to_13_mig05.py	Mon Jul 02 23:33:20 2007 +0200
@@ -12,8 +12,8 @@
           designed, as it has separate fields for timestamp and version),
           but we now have to keep the timestamp somewhere else. The appropriate
           place is of course the edit-log.
-    
-    So we change like this:      
+
+    So we change like this:
         * data/pages/PageName/backup/<UTC timestamp in usecs>
           -> data/pages/PageName/revisions/<revno>
     A page save is now done like that:
@@ -25,7 +25,7 @@
             * save to revisions/<revno>
             * mv 'notcurrent' 'current'
         * else give error msg and let user retry save
-            
+
     * data/user/<uid>.bookmark stays in usecs
     * data/event-log stays in usecs
     * data/edit-log and data/pages/PageName/edit-log stay in usecs and:
@@ -35,7 +35,7 @@
          * PageRev is identical to the filename in revisions/ directory
          * Extra is used for some stuff formerly put into comment field, like
            revert info or attach filename
-           
+
     Steps for a successful migration:
 
         1. Stop your wiki and make a backup of old data and code
@@ -89,17 +89,17 @@
     """ this gathers everything that is in edit-log into internal
         data structures, converting to the future format
     """
-    if not os.path.exists(el_from): 
+    if not os.path.exists(el_from):
         return
     for l in open(el_from):
         data = l.rstrip('\n').split('\t')
         origlen = len(data)
         while len(data) < 7: data.append('')
-        (pagename,ip,timestamp,host,id,comment,action) = data
+        (pagename, ip, timestamp, host, id, comment, action) = data
         if origlen == 6:
             action = comment
             comment = ''
-        
+
         extra = ''
         if action == 'SAVE/REVERT': # we missed to convert that in mig4
             ts = long(comment) # must be long for py 2.2.x
@@ -109,17 +109,17 @@
                 extra = str(ts)
             # later we convert this timestamp to a revision number
             comment = ''
-        if action in ['ATTNEW','ATTDRW','ATTDEL',]:
+        if action in ['ATTNEW', 'ATTDRW', 'ATTDEL', ]:
             extra = comment # filename
             comment = '' # so we can use comments on ATT* in future
 
         timestamp = long(timestamp) # must be long for py 2.2.x
-        data = [timestamp,'',action,pagename,ip,host,id,extra,comment]
-        
+        data = [timestamp, '', action, pagename, ip, host, id, extra, comment]
+
         entry = info.get(pagename, {})
         entry[timestamp] = [None, data]
         info[pagename] = entry
-        
+
 def gather_pagedirs(dir_from, is_backupdir=0):
     """ this gathers information from the pagedirs, i.e. text and backup
         files (and also the local editlog) and tries to merge/synchronize
@@ -130,22 +130,22 @@
     for pagename in pagelist:
         editlog_from = opj(dir_from, pagename, 'edit-log')
         gather_editlog(dir_from, editlog_from)
-         
+
         entry = info.get(pagename, {})
 
         loglist = [] # editlog timestamps of page revisions
-        for ts,data in entry.items():
-            if data[1][2] in ['SAVE','SAVENEW','SAVE/REVERT',]:
+        for ts, data in entry.items():
+            if data[1][2] in ['SAVE', 'SAVENEW', 'SAVE/REVERT', ]:
                 loglist.append(ts)
         loglist.sort()
         lleftover = loglist[:]
-        
+
         # remember the latest log entry
         if lleftover:
             llatest = lleftover[-1]
         else:
             llatest = None
-            
+
         backupdir_from = opj(dir_from, pagename, 'backup')
         if os.path.exists(backupdir_from):
             backuplist = listdir(backupdir_from)
@@ -157,7 +157,7 @@
                     entry[ts][0] = backup_from
                     lleftover.remove(ts)
                     bleftover.remove(bfile)
-            
+
         text_from = opj(dir_from, pagename, 'text')
         found_text = False
         if os.path.exists(text_from): # we have a text file, it should match latest log entry
@@ -171,7 +171,7 @@
                     found_text = True
             else: # we have no log entries left 8(
                 ts = wikiutil.timestamp2version(mtime)
-                data = [ts,'','SAVE', pagename,'','','','','missing editlog entry for this page version']
+                data = [ts, '', 'SAVE', pagename, '', '', '', '', 'missing editlog entry for this page version']
                 entry[ts] = [text_from, data]
         else:
             # this page was maybe deleted, so we remember for later:
@@ -179,7 +179,7 @@
             if llatest in lleftover: # if a page is deleted, the last log entry has no file
                 entry[llatest][0] = None
                 lleftover.remove(llatest)
-                        
+
         if os.path.exists(backupdir_from):
             backuplist = listdir(backupdir_from)
             for bfile in backuplist:
@@ -197,20 +197,20 @@
                         lleftover.remove(ts)
                         bleftover.remove(bfile)
                         print "Warning: Win32 daylight saving bug encountered & fixed!"
-                        
+
             if len(bleftover) == 1 and len(lleftover) == 1: # only 1 left, must be this
                 backup_from = opj(backupdir_from, bleftover[0])
                 entry[lleftover[0]][0] = backup_from
                 lleftover = []
                 bleftover = []
-            
+
             # fake some log entries
             for bfile in bleftover:
                 backup_from = opj(backupdir_from, bfile)
                 bts = long(bfile) # must be long py 2.2.x
-                data = [ts,'','SAVE',pagename,'','','','','missing editlog entry for this page version']
+                data = [ts, '', 'SAVE', pagename, '', '', '', '', 'missing editlog entry for this page version']
                 entry[bts] = [backup_from, data]
-                
+
         # check if we still haven't matched the "text" file
         if not found_text and os.path.exists(text_from):
             if llatest in lleftover: # latest log entry still free
@@ -219,14 +219,14 @@
             else: # log for "text" file is missing or latest was taken by other rev 8(
                 mtime = os.path.getmtime(text_from)
                 ts = wikiutil.timestamp2version(mtime) # take mtime, we have nothing better
-                data = [ts,'','SAVE', pagename,'','','','','missing editlog entry for this page version']
+                data = [ts, '', 'SAVE', pagename, '', '', '', '', 'missing editlog entry for this page version']
                 entry[ts] = [text_from, data]
-                
+
         # delete unmatching log entries
         for ts in lleftover:
             #print "XXX Deleting leftover log entry: %r" % entry[ts]
             del entry[ts]
-        
+
         info[pagename] = entry
 
 def remove_trash(dir_from):
@@ -270,7 +270,7 @@
                     file_to = opj(pagedir, 'revisions', revstr)
                     copy_file(file_from, file_to)
             f.close()
-                
+
             curr_file = opj(pagedir, 'current')
             f = open(curr_file, 'w')
             f.write(revstr)
@@ -280,7 +280,7 @@
         if os.path.exists(att_from):
             att_to = opj(pagedir, 'attachments')
             copy_dir(att_from, att_to)
-        
+
 
 def generate_editlog(dir_from, dir_to):
     editlog = {}
@@ -289,10 +289,10 @@
         for ts in entry:
             file_from, data = entry[ts]
             editlog[ts] = data
-    
+
     tslist = editlog.keys()
     tslist.sort()
-    
+
     editlog_file = opj(dir_to, 'edit-log')
     f = open(editlog_file, 'w')
     for ts in tslist:
@@ -300,7 +300,7 @@
         f.write('\t'.join(data)+'\n')
     f.close()
 
-        
+
 origdir = 'data.pre-mig5'
 
 # Backup original dir and create new empty dir
--- a/MoinMoin/script/old/migration/12_to_13_mig06.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/migration/12_to_13_mig06.py	Mon Jul 02 23:33:20 2007 +0200
@@ -60,10 +60,10 @@
     print "%s -> %s" % (fname_from, fname_to)
     file_from = open(fname_from)
     file_to = open(fname_to, "w")
-        
+
     for line in file_from:
-        line = line.replace('\r','')
-        line = line.replace('\n','')
+        line = line.replace('\r', '')
+        line = line.replace('\n', '')
         fields = line.split('\t')
         kvpairs = fields[2]
         kvpairs = kvpairs.split('&')
@@ -76,15 +76,15 @@
             val = convert_string(val, enc_from, enc_to)
             key = urllib.quote(key)
             val = urllib.quote(val)
-            kvlist.append("%s=%s" % (key,val))
+            kvlist.append("%s=%s" % (key, val))
         fields[2] = '&'.join(kvlist)
         line = '\t'.join(fields) + '\n'
         file_to.write(line)
 
     file_to.close()
     file_from.close()
-    st=os.stat(fname_from)
-    os.utime(fname_to, (st.st_atime,st.st_mtime))
+    st = os.stat(fname_from)
+    os.utime(fname_to, (st.st_atime, st.st_mtime))
 
 origdir = 'data.pre-mig6'
 
@@ -95,7 +95,7 @@
     sys.exit(1)
 
 copy_dir(origdir, 'data')
-os.remove(opj('data','event-log')) # old format
+os.remove(opj('data', 'event-log')) # old format
 convert_eventlog(opj(origdir, 'event-log'), opj('data', 'event-log'), from_encoding, to_encoding)
 
 
--- a/MoinMoin/script/old/migration/12_to_13_mig07.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/migration/12_to_13_mig07.py	Mon Jul 02 23:33:20 2007 +0200
@@ -2,7 +2,7 @@
 """
     12_to_13.py - converting CRLF / LF style to the future standard
     Use this to convert from 1.3 pre patch-275 to patch-275.
-    
+
     Changes:
     * use OS style for logs (== no change, same as it was)
     * use CRLF for page files on any platform (text/* mandates it!) -
@@ -30,7 +30,7 @@
     fi = open(fni, "rb")
     data = fi.read()
     fi.close()
-    data = data.replace("\r","")
+    data = data.replace("\r", "")
     lines = data.split("\n")
     data = "\r\n".join(lines)
     if data[-2:] != "\r\n":
@@ -38,18 +38,18 @@
     fo = open(fno, "wb")
     fo.write(data)
     fo.close()
-    st=os.stat(fni)
-    os.utime(fno, (st.st_atime,st.st_mtime))
-                
+    st = os.stat(fni)
+    os.utime(fno, (st.st_atime, st.st_mtime))
+
 def process_pagedirs(dir_from, dir_to):
     pagelist = listdir(dir_from)
     for pagename in pagelist:
         pagedir_from = opj(dir_from, pagename)
         pagedir_to = opj(dir_to, pagename)
-        
+
         # first we copy all, even the stuff we convert later:
         copy_dir(pagedir_from, pagedir_to)
-        
+
         rev_from = opj(pagedir_from, 'revisions')
         rev_to = opj(pagedir_to, 'revisions')
         if os.path.exists(rev_from):
@@ -68,7 +68,7 @@
     print "You need to be in the directory where your copy of the 'data' directory is located."
     sys.exit(1)
 
-os.makedirs(opj('data','pages'))
+os.makedirs(opj('data', 'pages'))
 
 process_pagedirs(opj(origdir, 'pages'), opj('data', 'pages'))
 
--- a/MoinMoin/script/old/migration/12_to_13_mig08.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/migration/12_to_13_mig08.py	Mon Jul 02 23:33:20 2007 +0200
@@ -9,7 +9,7 @@
       to convert those entries to use revno == 99999999 and renumber the
       normal entries so we have no missing numbers in between
     * edit-log's action field sometimes was empty (default: SAVE)
-    
+
     Steps for a successful migration:
 
         1. Stop your wiki and make a backup of old data and code
@@ -60,21 +60,21 @@
     """ this gathers everything that is in edit-log into internal
         data structures, converting to the future format
     """
-    if not os.path.exists(el_from): 
+    if not os.path.exists(el_from):
         return
     for l in open(el_from):
         data = l.rstrip('\n').rstrip('\r').split('\t')
         while len(data) < 9:
             data.append('')
-        (timestampstr,revstr,action,pagename,ip,host,id,extra,comment) = data
-        
+        (timestampstr, revstr, action, pagename, ip, host, id, extra, comment) = data
+
         if forcepagename: # we use this for edit-log in pagedirs (for renamed pages!)
             pagename = forcepagename
 
         if not action: # FIX: sometimes action is empty ...
             action = 'SAVE'
 
-        if action in ['ATTNEW','ATTDRW','ATTDEL',]:
+        if action in ['ATTNEW', 'ATTDRW', 'ATTDEL', ]:
             revstr = '99999999' # FIXES revno
             # use reserved value, ATT action doesn't create new rev of anything
 
@@ -84,15 +84,15 @@
             comment = 'missing edit-log entry for this revision' # more precise
             extra = ''
             id = ''
-            
+
         rev = int(revstr)
-        data = [timestampstr,rev,action,pagename,ip,host,id,extra,comment]
-        
+        data = [timestampstr, rev, action, pagename, ip, host, id, extra, comment]
+
         entry = info.get(pagename, {})
         timestamp = long(timestampstr) # must be long for py 2.2.x
         entry[timestamp] = [99999999, data] # new revno, data
         info[pagename] = entry
-        
+
 def gather_pagedirs(dir_from):
     """ this gathers edit-log information from the pagedirs, just to make sure
     """
@@ -104,7 +104,7 @@
 
 
 def generate_pages(dir_from, dir_to):
-    revactions = ['SAVE','SAVENEW','SAVE/REVERT',] # these actions create revisions
+    revactions = ['SAVE', 'SAVENEW', 'SAVE/REVERT', ] # these actions create revisions
     for pn in info:
         entry = info.get(pn, {})
         tslist = entry.keys()
@@ -119,7 +119,7 @@
             for ts in tslist:
                 data = entry[ts][1]
                 datanew = data[:]
-                (timestamp,rev,action,pagename,ip,host,id,extra,comment) = data
+                (timestamp, rev, action, pagename, ip, host, id, extra, comment) = data
                 revstr = '%08d' % rev
                 if action in revactions:
                     revnew += 1
@@ -133,20 +133,20 @@
                     revertrevnew = 0
                     for ts2 in tslist:
                         data2 = entry[ts2][1]
-                        (timestamp2,rev2,action2,pagename2,ip2,host2,id2,extra2,comment2) = data2
+                        (timestamp2, rev2, action2, pagename2, ip2, host2, id2, extra2, comment2) = data2
                         if rev2 == revertrevold:
                             revertrevnew = entry[ts2][0]
                     datanew[7] = '%08d' % revertrevnew
-                    
+
                 datanew[1] = revnewstr
                 f.write('\t'.join(datanew)+'\n') # does make a CRLF on win32 in the file
-                
+
                 if action in revactions: # we DO have a page rev for this one
                     file_from = opj(dir_from, 'pages', pn, 'revisions', revstr)
                     file_to = opj(revdir, revnewstr)
                     copy_file(file_from, file_to)
             f.close()
-            
+
             # check if page exists or is deleted in orig dir
             pagedir_from = opj(dir_from, 'pages', pn)
             revdir_from = opj(pagedir_from, 'revisions')
@@ -156,7 +156,7 @@
                 page_exists = 1
             except:
                 page_exists = 0
-                
+
             # re-make correct DELETED status!
             if page_exists:
                 curr_file = opj(pagedir, 'current')
@@ -168,7 +168,7 @@
         if os.path.exists(att_from):
             att_to = opj(pagedir, 'attachments')
             copy_dir(att_from, att_to)
-        
+
 
 def generate_editlog(dir_from, dir_to):
     editlog = {}
@@ -177,10 +177,10 @@
         for ts in entry:
             file_from, data = entry[ts]
             editlog[ts] = data
-    
+
     tslist = editlog.keys()
     tslist.sort()
-    
+
     editlog_file = opj(dir_to, 'edit-log')
     f = open(editlog_file, 'w')
     for ts in tslist:
@@ -190,7 +190,7 @@
         f.write('\t'.join(datatmp)+'\n')
     f.close()
 
-        
+
 origdir = 'data.pre-mig8'
 
 # Backup original dir and create new empty dir
--- a/MoinMoin/script/old/migration/12_to_13_mig09.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/migration/12_to_13_mig09.py	Mon Jul 02 23:33:20 2007 +0200
@@ -62,7 +62,7 @@
     # No need to convert new style list
     if '\t' in string:
         return string
-        
+
     names = [name.strip() for name in string.split(',')]
     names = [wikiutil.unquoteWikiname(name) for name in names if name != '']
     string = user.encodeList(names)
@@ -81,7 +81,7 @@
     string = user.encodeList(names)
     return string
 
-    
+
 def convertUserData(text):
     """ Convert user data
 
@@ -105,7 +105,7 @@
     # Join back, append newline to last line
     text = u'\n'.join(lines) + u'\n'
     return text
-        
+
 
 def convertUsers(srcdir, dstdir):
     """ Convert users files
@@ -114,7 +114,7 @@
     @param dstdir: new users dir
     """
     charset = 'utf-8'
-    
+
     # Create dstdir
     if not os.path.exists(dstdir):
         try:
@@ -143,7 +143,7 @@
 
 
 if __name__ == '__main__':
-          
+
     # Backup original dir
     datadir = 'data'
     origdir = 'data.pre-mig9'
--- a/MoinMoin/script/old/migration/12_to_13_mig10.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/migration/12_to_13_mig10.py	Mon Jul 02 23:33:20 2007 +0200
@@ -4,7 +4,7 @@
     We fix 2 issues here:
     * we forgot to handle edit-lock files. We simply delete them now.
     * we convert attachment names to utf-8
-    
+
     Steps for a successful migration:
 
         1. Stop your wiki and make a backup of old data and code
@@ -14,7 +14,7 @@
         3. make sure that from_encoding and to_encoding matches your needs (see
            beginning of script below and config.charset in moin_config.py) and
            run python2.3 12_to_13_mig10.py from your working dir
-        
+
         4. If there was no error, you will find:
             data.pre-mig10 - the script renames your data directory copy to that name
             data - converted data dir
@@ -74,10 +74,10 @@
                     f.decode(to_encoding)
                 except UnicodeDecodeError:
                     fnew = f.decode(from_encoding).encode(to_encoding)
-                    os.rename(os.path.join(root,f), os.path.join(root, fnew))
+                    os.rename(os.path.join(root, f), os.path.join(root, fnew))
                     print 'renamed', f, '\n ->', fnew, ' in dir:', root
 
-        
+
 origdir = 'data.pre-mig10'
 destdir = 'data'
 
--- a/MoinMoin/script/old/migration/12_to_13_mig11.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/migration/12_to_13_mig11.py	Mon Jul 02 23:33:20 2007 +0200
@@ -5,7 +5,7 @@
     Although we supply those files in the new "empty wiki template" in
     wiki/data, many people forgot to update their plugin directories,
     so we do that via this mig script now.
-    
+
     Steps for a successful migration:
 
         1. Stop your wiki and make a backup of old data and code
--- a/MoinMoin/script/old/migration/152_to_1050300.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/migration/152_to_1050300.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,11 +1,11 @@
 #!/usr/bin/env python
 """
     Migration from moin 1.5.2 to moin 1.5.3
-    
+
     We just make sure that there is a "meta" file in your data directory that
     stores the "revision" level of it (so future mig scripts can tell if they
     need to run or not [e.g. because you already have run them]).
-    
+
     This is the last "old style" migration script.
 
     Steps for a successful migration:
@@ -13,14 +13,14 @@
         1. You do NOT need to stop your wiki for this mig script.
 
         2. Change directory to: .../MoinMoin/script/old/migration
-        
+
         3. Run this script as a user who may write to the data_dir of your wiki
            and supply the pathes to the data_dir you want to migrate. If you
            have multiple wikis, you may specify multiple pathes on the command
            line:
 
            sudo -u www-data ./152_to_1050300.py /my/path/to/data
-                                 
+
         4. That's it.
            Future mig scripts now can auto-detect the data_dir revision level.
 
@@ -58,7 +58,7 @@
 
 if __name__ == '__main__':
     if len(sys.argv) < 2:
-        data_dirs = ['data',]
+        data_dirs = ['data', ]
     else:
         data_dirs = sys.argv[1:]
     migrate(data_dirs)
--- a/MoinMoin/script/old/print_stats.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/print_stats.py	Mon Jul 02 23:33:20 2007 +0200
@@ -5,7 +5,7 @@
 
     Usage:
         print_stats.py statsfile
-    
+
     Typical usage:
      1. Edit moin.py and activate the hotshot profiler, set profile file name
      2. Run moin.py
@@ -14,7 +14,7 @@
      5. Run this tool: print_stats.py moin.prof
 
     Currently CGI and twisted also have a hotshot profiler integration.
-    
+
     @copyright: 2005 by Thomas Waldmann (MoinMoin:ThomasWaldmann)
     @license: GNU GPL, see COPYING for details.
 """
@@ -25,8 +25,8 @@
     if len(sys.argv) != 2:
         print __doc__
         sys.exit()
-        
-    # Load and print stats 
+
+    # Load and print stats
     s = stats.load(sys.argv[1])
     s.strip_dirs()
     s.sort_stats('cumulative', 'time', 'calls')
--- a/MoinMoin/script/old/repair_language.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/repair_language.py	Mon Jul 02 23:33:20 2007 +0200
@@ -85,20 +85,20 @@
 
     # Get text lines
     lines = text.splitlines()
-    
+
     # Look in page header
     for i in range(len(lines)):
         line = lines[i]
         if not line.startswith(u'#'):
             break # end of header
-        
+
         if line.startswith(needle):
             # Get language from rest of line
             lang = line[len(needle):].strip()
             # Normalize language names. Language files are named xx_yy,
             # but iso names use xx-yy. This can confuse people.
             lang = lang.replace(u"_", u"-")
-                
+
             # Validate lang, make new style language processing
             # instruction.
             if lang in valid_languages:
@@ -114,18 +114,18 @@
 
 def processPages(path, repair):
     """ Process page directory
-    
+
     @param repair: repair or just test
     """
     charset = 'utf-8'
-    
+
     pages = [p for p in listdir(path) if os.path.isdir(os.path.join(path, p))]
     for page in pages:
         revdir = os.path.join(path, page, 'revisions')
         if not os.path.isdir(revdir):
             print 'Error: %s: missing revisions directory' % page
             continue
-        
+
         for rev in listdir(revdir):
             revpath = os.path.join(revdir, rev)
             # Open file, read text
@@ -152,16 +152,16 @@
         print "Error: could not find 'pages' directory"
         print 'Run this script from your wiki data directory'
         print __doc__
-        sys.exit(1)   
-    
-    options = {'verify': 0, 'repair': 1,}
-    
+        sys.exit(1)
+
+    options = {'verify': 0, 'repair': 1, }
+
     if len(sys.argv) != 2 or sys.argv[1] not in options:
         print __doc__
         sys.exit(1)
 
     processPages(path, repair=options[sys.argv[1]])
-    
 
 
 
+
--- a/MoinMoin/script/old/xmlrpc-tools/UpdateGroupTest.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/xmlrpc-tools/UpdateGroupTest.py	Mon Jul 02 23:33:20 2007 +0200
@@ -19,12 +19,12 @@
 
     groupname = "TestGroup"
     groupdesc = "This is just a test."
-    groupmembers = ["TestUser1", "TestUser2",]
+    groupmembers = ["TestUser1", "TestUser2", ]
     print mywiki.UpdateGroup(groupname, groupdesc, groupmembers)
 
     groupname = "TestAclGroup"
     groupdesc = "This is just a test."
-    groupmembers = ["TestUser3",]
+    groupmembers = ["TestUser3", ]
     print mywiki.UpdateGroup(groupname, groupdesc, groupmembers, "All:read,write,delete,revert")
 
     del mywiki
@@ -37,7 +37,7 @@
 
     groupname = "TestGroup"
     groupdesc = "This is just a test."
-    groupmembers = ["WrongUser1", "WrongUser2",]
+    groupmembers = ["WrongUser1", "WrongUser2", ]
     print mywiki.UpdateGroup(groupname, groupdesc, groupmembers)
 
 
--- a/MoinMoin/script/old/xmlrpc-tools/get_es_pages.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/xmlrpc-tools/get_es_pages.py	Mon Jul 02 23:33:20 2007 +0200
@@ -15,15 +15,15 @@
         pd = s.getPage(pn)
         dn = wikiutil.quoteWikinameFS(pn.decode("utf-8"))
         os.mkdir(dn)
-        cn = os.path.join(dn,'current')
-        f = open(cn,'w')
+        cn = os.path.join(dn, 'current')
+        f = open(cn, 'w')
         f.write('00000001\n')
         f.close()
         dn2 = os.path.join(dn, 'revisions')
         os.mkdir(dn2)
-        fn = os.path.join(dn2,'00000001')
-        f = codecs.open(fn,"wb","utf-8")
-        pd = pd.replace('\n','\r\n')
+        fn = os.path.join(dn2, '00000001')
+        f = codecs.open(fn, "wb", "utf-8")
+        pd = pd.replace('\n', '\r\n')
         f.write(pd)
         f.close()
 
--- a/MoinMoin/script/old/xmlrpc-tools/getmasterpages2.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/xmlrpc-tools/getmasterpages2.py	Mon Jul 02 23:33:20 2007 +0200
@@ -17,7 +17,7 @@
 user = "YourWikiName"
 password = "yourbasicauthpassword"
 srcwiki = xmlrpclib.ServerProxy("http://moinmaster.wikiwikiweb.de/?action=xmlrpc2")
-dsttrans = BasicAuthTransport(user,password)
+dsttrans = BasicAuthTransport(user, password)
 dstwiki = xmlrpclib.ServerProxy("http://devel.linuxwiki.org/moin--main/__xmlrpc/?action=xmlrpc2", transport=dsttrans)
 
 def rawGetPage(srcurl, pagename, encoding='iso-8859-1'):
@@ -29,7 +29,7 @@
     pagedata = srcwiki.getPage(pagename)
     #pagedata = rawGetPage(srcurlformat, pagename, 'iso-8859-1')
     rc = dstwiki.putPage(pagename, pagedata)
-    print "Transferred %s. Len = %d, rc = %s" % (pagename.encode('ascii','replace'), len(pagedata), str(rc))
+    print "Transferred %s. Len = %d, rc = %s" % (pagename.encode('ascii', 'replace'), len(pagedata), str(rc))
 
 def run():
     allsystempagesgroup = 'AllSystemPagesGroup'
--- a/MoinMoin/script/old/xmlrpc-tools/getsystempages2.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/xmlrpc-tools/getsystempages2.py	Mon Jul 02 23:33:20 2007 +0200
@@ -12,8 +12,8 @@
 #srcwiki = xmlrpclib.ServerProxy("http://moinmaster.wikiwikiweb.de/FrontPage?action=xmlrpc")
 user = "YourWikiName"
 password = "yourbasicauthpassword"
-srctrans = BasicAuthTransport(user,password)
-dsttrans = BasicAuthTransport(user,password)
+srctrans = BasicAuthTransport(user, password)
+dsttrans = BasicAuthTransport(user, password)
 srcwiki = xmlrpclib.ServerProxy("http://devel.linuxwiki.org/moin--cvs/__xmlrpc/?action=xmlrpc2", transport=srctrans)
 dstwiki = xmlrpclib.ServerProxy("http://devel.linuxwiki.org/moin--cvs/__xmlrpc/?action=xmlrpc2", transport=dsttrans)
 
--- a/MoinMoin/script/old/xmlrpc-tools/wikibackup.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/xmlrpc-tools/wikibackup.py	Mon Jul 02 23:33:20 2007 +0200
@@ -13,7 +13,7 @@
     * attachments
     * user account data
     * MoinMoin code or config running the wiki
-    
+
 So this is definitely NOT a complete backup.
 
 GPL software, 2003-08-10 Thomas Waldmann
@@ -29,14 +29,14 @@
     #srcwiki = xmlrpclib.ServerProxy("http://devel.linuxwiki.org/moin--cvs/__xmlrpc/?action=xmlrpc2", transport=srctrans)
     srcwiki = xmlrpclib.ServerProxy("http://devel.linuxwiki.org/moin--cvs/?action=xmlrpc2")
 
-    backup={}
+    backup = {}
     allpages = srcwiki.getAllPages()
     for pagename in allpages:
         pagedata = srcwiki.getPage(pagename)
         print "Got %s." % pagename
-        backup[pagename]=pagedata
+        backup[pagename] = pagedata
 
-    backupfile = open("wikibackup.pickle","w")
+    backupfile = open("wikibackup.pickle", "w")
     pickle.dump(backup, backupfile, PICKLE_PROTOCOL)
     backupfile.close()
 
--- a/MoinMoin/script/old/xmlrpc-tools/wikirestore.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/old/xmlrpc-tools/wikirestore.py	Mon Jul 02 23:33:20 2007 +0200
@@ -14,7 +14,7 @@
     * attachments
     * user account data
     * MoinMoin code or config running the wiki
-    
+
 So this is definitely NOT a complete restore.
 
 GPL software, 2003-10-24 Thomas Waldmann
@@ -26,11 +26,11 @@
 
     user = "ThomasWaldmann"
     password = "xxxxxxxxxxxx"
-    dsttrans = BasicAuthTransport(user,password)
+    dsttrans = BasicAuthTransport(user, password)
     dstwiki = xmlrpclib.ServerProxy("http://devel.linuxwiki.org/moin--cvs/__xmlrpc/?action=xmlrpc2", transport=dsttrans)
     #dstwiki = xmlrpclib.ServerProxy("http://devel.linuxwiki.org/moin--cvs/?action=xmlrpc2")
 
-    backupfile = open("wikibackup.pickle","r")
+    backupfile = open("wikibackup.pickle", "r")
     backup = pickle.load(backupfile)
     backupfile.close()
 
@@ -41,3 +41,4 @@
 
 if __name__ == "__main__":
     run()
+
--- a/MoinMoin/script/xmlrpc/remote.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/script/xmlrpc/remote.py	Mon Jul 02 23:33:20 2007 +0200
@@ -32,7 +32,7 @@
 
         s = xmlrpclib.ServerProxy(url)
 
-        # TODO handle stdin 
+        # TODO handle stdin
         # xmlrpclib.Binary(sys.stdin.read())
         result = s.RemoteScript(secret, self.argv)
         # TODO handle stdout, stderr
--- a/MoinMoin/search/Xapian.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/search/Xapian.py	Mon Jul 02 23:33:20 2007 +0200
@@ -61,7 +61,7 @@
 
 class WikiAnalyzer:
     """ A text analyzer for wiki syntax
-    
+
     The purpose of this class is to anaylze texts/pages in wiki syntax
     and yield yielding single terms for xapwrap to feed into the xapian
     database.
@@ -222,9 +222,9 @@
         # every version greater than or equal to XAPIAN_MIN_VERSION is allowed
         XAPIAN_MIN_VERSION = (0, 9, 6)
         try:
-           major, minor, revision = xapian.major_version(), xapian.minor_version(), xapian.revision()
+            major, minor, revision = xapian.major_version(), xapian.minor_version(), xapian.revision()
         except AttributeError:
-           major, minor, revision = xapian.xapian_major_version(), xapian.xapian_minor_version(), xapian.xapian_revision() # deprecated since xapian 0.9.6, removal in 1.1.0
+            major, minor, revision = xapian.xapian_major_version(), xapian.xapian_minor_version(), xapian.xapian_revision() # deprecated since xapian 0.9.6, removal in 1.1.0
         if (major, minor, revision) >= XAPIAN_MIN_VERSION:
             return
 
@@ -248,7 +248,7 @@
 
     def _search(self, query, sort='weight', historysearch=0):
         """ Perform the search using xapian (read-lock acquired)
-        
+
         @param query: the search query objects
         @keyword sort: the sorting of the results (default: 'weight')
         @keyword historysearch: whether to search in all page revisions (default: 0) TODO: use/implement this
@@ -317,7 +317,7 @@
 
     def termpositions(self, uid, term):
         """ Fetches all positions of a term in a document
-        
+
         @param uid: document id of the item in the xapian index
         @param term: the term as a string
         """
@@ -376,7 +376,7 @@
                     doc.uid = uid
                     id = writer.index(doc)
                 elif mode == 'add':
-                    if debug: request.log("%s (add)" % (filename,))
+                    if debug: request.log("%s (add)" % (filename, ))
                     id = writer.index(doc)
         except (OSError, IOError):
             pass
@@ -404,9 +404,9 @@
                 pass
             except TypeError:
                 # Stemmer(lang) has an exception bug if the language is not available
-                # TypeError: exceptions must be strings, classes, or instances, 
+                # TypeError: exceptions must be strings, classes, or instances,
                 pass
-    
+
         if not lang:
             # no lang found at all.. fallback to default language
             lang = default_lang
@@ -520,7 +520,7 @@
                 doc.uid = uid
                 id = writer.index(doc)
             elif mode == 'add':
-                if debug: request.log("%s (add)" % (pagename,))
+                if debug: request.log("%s (add)" % (pagename, ))
                 id = writer.index(doc)
 
         from MoinMoin.action import AttachFile
@@ -578,7 +578,7 @@
                     doc.uid = uid
                     id = writer.index(doc)
                 elif mode == 'add':
-                    if debug: request.log("%s (add)" % (pagename,))
+                    if debug: request.log("%s (add)" % (pagename, ))
                     id = writer.index(doc)
         #writer.flush()
 
@@ -611,9 +611,9 @@
 
     def _index_pages(self, request, files=None, mode='update'):
         """ Index all pages (and all given files)
-        
+
         This should be called from indexPages or indexPagesInNewThread only!
-        
+
         This may take some time, depending on the size of the wiki and speed
         of the machine.
 
--- a/MoinMoin/search/__init__.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/search/__init__.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,7 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 """
     MoinMoin - search engine
-    
+
     @copyright: 2005 MoinMoin:FlorianFesti,
                 2005 MoinMoin:NirSoffer,
                 2005 MoinMoin:AlexanderSchremmer,
@@ -15,7 +15,7 @@
 
 def searchPages(request, query, sort='weight', mtime=None, historysearch=None, **kw):
     """ Search the text of all pages for query.
-    
+
     @param request: current request
     @param query: the expression (string or query objects) we want to search for
     @keyword sort: sorting of the search results, either 'weight' or 'page_name'
--- a/MoinMoin/search/_tests/test_search.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/search/_tests/test_search.py	Mon Jul 02 23:33:20 2007 +0200
@@ -11,10 +11,10 @@
 
 
 class TestQuotingBug(unittest.TestCase):
-    """search: quoting bug tests 
-    
+    """search: quoting bug tests
+
     http://moinmoin.wikiwikiweb.de/MoinMoinBugs/SearchOneCharString
-    
+
     This is only a little stupid test for the isQuoted method, because
     testing parsed queries is much more work.
     """
--- a/MoinMoin/search/builtin.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/search/builtin.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,7 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 """
     MoinMoin - search engine internals
-    
+
     @copyright: 2005 MoinMoin:FlorianFesti,
                 2005 MoinMoin:NirSoffer,
                 2005 MoinMoin:AlexanderSchremmer,
@@ -43,7 +43,7 @@
 
     def append(self, pagename):
         """ Append a page to queue
-        
+
         @param pagename: string to save
         """
         if not self.writeLock.acquire(60.0):
@@ -69,7 +69,7 @@
 
     def remove(self, pages):
         """ Remove pages from the queue
-        
+
         When the queue is empty, the queue file is removed, so exists()
         can tell if there is something waiting in the queue.
 
@@ -96,7 +96,7 @@
 
     def _decode(self, data):
         """ Decode queue data
-        
+
         @param data: the data to decode
         """
         pages = data.splitlines()
@@ -104,7 +104,7 @@
 
     def _filterDuplicates(self, pages):
         """ Filter duplicates in page list, keeping the order
-        
+
         @param pages: list of pages to filter
         """
         unique = []
@@ -117,7 +117,7 @@
 
     def _read(self):
         """ Read and return queue data
-        
+
         This does not do anything with the data so we can release the
         lock as soon as possible, enabling others to update the queue.
         """
@@ -134,7 +134,7 @@
 
     def _write(self, pages):
         """ Write pages to queue file
-        
+
         Requires queue write locking.
 
         @param pages: list of pages to write
@@ -148,8 +148,8 @@
             f.close()
 
     def _removeFile(self):
-        """ Remove queue file 
-        
+        """ Remove queue file
+
         Requires queue write locking.
         """
         try:
@@ -205,14 +205,14 @@
 
     def _search(self, query):
         """ Actually perfom the search (read-lock acquired)
-        
+
         @param query: the search query objects tree
         """
         raise NotImplemented('...')
 
     def search(self, query, **kw):
         """ Search for items in the index
-        
+
         @param query: the search query objects to pass to the index
         """
         #if not self.read_lock.acquire(1.0):
@@ -246,7 +246,7 @@
 
     def indexPages(self, files=None, mode='update'):
         """ Index all pages (and files, if given)
-        
+
         Can be called only from a script. To index pages during a user
         request, use indexPagesInNewThread.
         @keyword files: iterator or list of files to index additionally
@@ -268,7 +268,7 @@
 
     def indexPagesInNewThread(self, files=None, mode='update'):
         """ Index all pages in a new thread
-        
+
         Should be called from a user request. From a script, use indexPages.
         """
         # Prevent rebuilding the index just after it was finished
@@ -292,9 +292,9 @@
 
     def _index_pages(self, request, files=None, mode='update'):
         """ Index all pages (and all given files)
-        
+
         This should be called from indexPages or indexPagesInNewThread only!
-        
+
         This may take some time, depending on the size of the wiki and speed
         of the machine.
 
@@ -319,7 +319,7 @@
 
     def _do_queued_updates_InNewThread(self):
         """ do queued index updates in a new thread
-        
+
         Should be called from a user request. From a script, use indexPages.
         """
         if not self.lock.acquire(1.0):
@@ -337,7 +337,7 @@
             from threading import Thread
             indexThread = Thread(
                     target=lockedDecorator(self._do_queued_updates),
-                    args=(self._indexingRequest(self.request),))
+                    args=(self._indexingRequest(self.request), ))
             indexThread.setDaemon(True)
 
             # Join the index thread after current request finish, prevent
@@ -356,7 +356,7 @@
 
     def _do_queued_updates(self, request, amount=5):
         """ Perform updates in the queues (read-lock acquired)
-        
+
         @param request: the current request
         @keyword amount: how many updates to perform at once (default: 5)
         """
@@ -368,7 +368,7 @@
 
     def contentfilter(self, filename):
         """ Get a filter for content of filename and return unicode content.
-        
+
         @param filename: name of the file
         """
         request = self.request
@@ -392,7 +392,7 @@
 
     def _indexingRequest(self, request):
         """ Return a new request that can be used for index building.
-        
+
         This request uses a security policy that lets the current user
         read any page. Without this policy some pages will not render,
         which will create broken pagelinks index.
@@ -500,7 +500,7 @@
 
     def _xapianSearch(self):
         """ Search using Xapian
-        
+
         Get a list of pages using fast xapian search and
         return moin search in those pages if needed.
         """
@@ -561,7 +561,7 @@
 
     def _xapianMatchDecider(self, term, pos):
         """ Returns correct Match object for a Xapian match
-        
+
         @param term: the term as string
         @param pos: starting position of the match
         """
@@ -572,7 +572,7 @@
 
     def _xapianMatch(self, uid, page=None):
         """ Get all relevant Xapian matches per document id
-        
+
         @param uid: the id of the document in the xapian index
         """
         positions = {}
@@ -593,8 +593,8 @@
         return matches
 
     def _moinSearch(self, pages=None):
-        """ Search pages using moin's built-in full text search 
-        
+        """ Search pages using moin's built-in full text search
+
         Return list of tuples (page, match). The list may contain
         deleted pages or pages the user may not read.
 
@@ -611,7 +611,7 @@
 
     def _moinMatch(self, page, uid=None):
         """ Get all matches from regular moinSearch
-        
+
         @param page: the current page instance
         """
         if page:
@@ -666,8 +666,8 @@
         return hits
 
     def _getPageList(self):
-        """ Get list of pages to search in 
-        
+        """ Get list of pages to search in
+
         If the query has a page filter, use it to filter pages before
         searching. If not, get a unfiltered page list. The filtering
         will happen later on the hits, which is faster with current
@@ -683,7 +683,7 @@
 
     def _filter(self, hits):
         """ Filter out deleted or acl protected pages
-        
+
         @param hits: list of hits
         """
         userMayRead = self.request.user.may.read
--- a/MoinMoin/search/queryparser.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/search/queryparser.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,7 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 """
     MoinMoin - search query parser
-    
+
     @copyright: 2005 MoinMoin:FlorianFesti,
                 2005 MoinMoin:NirSoffer,
                 2005 MoinMoin:AlexanderSchremmer,
@@ -63,7 +63,7 @@
 
     def costs(self):
         """ Return estimated time to calculate this term
-        
+
         Number is relative to other terms and has no real unit.
         It allows to do the fast searches first.
         """
@@ -223,7 +223,7 @@
 
     def search(self, page):
         """ Search page with terms
-        
+
         @param page: the page instance
         """
 
@@ -254,7 +254,7 @@
 
         @param pattern: pattern to search for, ascii string or unicode
         @param use_re: treat pattern as re of plain text, bool
-        @param case: do case sensitive search, bool 
+        @param case: do case sensitive search, bool
         """
         self._pattern = unicode(pattern)
         self.negated = 0
@@ -365,7 +365,7 @@
 
         @param pattern: pattern to search for, ascii string or unicode
         @param use_re: treat pattern as re of plain text, bool
-        @param case: do case sensitive search, bool 
+        @param case: do case sensitive search, bool
         """
         self._pattern = unicode(pattern)
         self.negated = 0
@@ -489,7 +489,7 @@
 
         @param pattern: pattern to search for, ascii string or unicode
         @param use_re: treat pattern as re of plain text, bool
-        @param case: do case sensitive search, bool 
+        @param case: do case sensitive search, bool
         """
         # used for search in links
         self._pattern = pattern
@@ -586,7 +586,7 @@
 
         @param pattern: pattern to search for, ascii string or unicode
         @param use_re: treat pattern as re of plain text, bool
-        @param case: do case sensitive search, bool 
+        @param case: do case sensitive search, bool
         """
         # iso language code, always lowercase
         self._pattern = pattern.lower()
@@ -711,7 +711,7 @@
 
         @param pattern: pattern to search for, ascii string or unicode
         @param use_re: treat pattern as re of plain text, bool
-        @param case: do case sensitive search, bool 
+        @param case: do case sensitive search, bool
         """
         self._pattern = pattern.lower()
         self.negated = 0
@@ -771,7 +771,7 @@
 
         @param pattern: pattern to search for, ascii string or unicode
         @param use_re: treat pattern as re of plain text, bool
-        @param case: do case sensitive search, bool 
+        @param case: do case sensitive search, bool
         """
         self._pattern = pattern.lower()
         self.negated = 0
--- a/MoinMoin/search/results.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/search/results.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,7 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 """
     MoinMoin - search results processing
-    
+
     @copyright: 2005 MoinMoin:FlorianFesti,
                 2005 MoinMoin:NirSoffer,
                 2005 MoinMoin:AlexanderSchremmer,
@@ -21,7 +21,7 @@
 
 class Match(object):
     """ Base class for all Matches (found pieces of pages).
-    
+
     This class represents a empty True value as returned from negated searches.
     """
     # Default match weight
@@ -75,7 +75,7 @@
 
 class TitleMatch(Match):
     """ Represents a match in the page title
-    
+
     Has more weight than a match in the page content.
     """
     # Matches in titles are much more important in wikis. This setting
@@ -128,7 +128,7 @@
 
         @param unique: return only unique matches (bool)
         @param sort: match attribute to sort by (string)
-        @param type: type of match to return (Match or sub class) 
+        @param type: type of match to return (Match or sub class)
         @rtype: list
         @return: list of matches
         """
@@ -491,7 +491,7 @@
                 if matches[j].start >= start:
                     break
 
-            # Add all matches in context and the text between them 
+            # Add all matches in context and the text between them
             while True:
                 match = matches[j]
                 # Ignore matches behind the current position
@@ -536,7 +536,7 @@
 
         This function is needed only because we don't have yet a weight
         algorithm for page text matches.
-        
+
         Try to find the first match in the page text. If we can't find
         one, we return the first match and start=0.
 
@@ -746,7 +746,7 @@
 
     def querystring(self, querydict=None):
         """ Return query string, used in the page link
-        
+
         @keyword querydict: use these parameters (default: None)
         """
         if querydict is None:
@@ -758,7 +758,7 @@
 
     def formatInfo(self, formatter, page):
         """ Return formatted match info
-        
+
         @param formatter: the formatter instance to use
         @param page: the current page instance
         """
--- a/MoinMoin/security/__init__.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/security/__init__.py	Mon Jul 02 23:33:20 2007 +0200
@@ -38,14 +38,14 @@
     acl = p.getACL(request) # this will be fast in a reused page obj
     return acl.may(request, user, right)
 
-    
+
 def _checkHierarchically(request, pagename, username, attr):
     """ Get permission by traversing page hierarchy
 
     We check each page in the hierarchy. We start with the deepest page and
-    recurse to the top of the tree. If one of those permits, True is returned. 
+    recurse to the top of the tree. If one of those permits, True is returned.
 
-    This method should not be called by users, use __getattr__ instead. 
+    This method should not be called by users, use __getattr__ instead.
 
     @param request: the current request object
     @param pagename: pagename to get permissions from
@@ -62,7 +62,7 @@
     allowed = request.cfg.cache.acl_rights_before.may(request, username, attr)
     if allowed is not None:
         return allowed
-    
+
     # Get permission
     some_acl = False
     for i in range(len(pages), 0, -1):
@@ -131,7 +131,7 @@
 
     def __getattr__(self, attr):
         """ Shortcut to export getPermission function for all known ACL rights
-        
+
         if attr is one of the rights in acl_rights_valid, then return a
         checking function for it. Else raise an AttributeError.
 
@@ -155,7 +155,7 @@
     Control who may do what on or with a wiki page.
 
     Syntax of an ACL string:
-    
+
         [+|-]User[,User,...]:[right[,right,...]] [[+|-]SomeGroup:...] ...
         ... [[+|-]Known:...] [[+|-]All:...]
 
@@ -195,9 +195,9 @@
         right list are automatically set to NO.
 
     Using Prefixes
-        
+
         To make the system more flexible, there are also two modifiers:
-        the prefixes "+" and "-". 
+        the prefixes "+" and "-".
 
             +SomeUser:read -OtherUser:write
 
@@ -207,13 +207,13 @@
         above acl line does not define if he can or can not write. He
         will be able to write if acl_rights_before or acl_rights_after
         allow this (see configuration options).
-        
+
         Using prefixes, this acl line:
-        
+
             SomeUser:read,write SomeGroup:read,write,admin All:read
 
         Can be written as:
-        
+
             -SomeUser:admin SomeGroup:read,write,admin All:read
 
         Or even:
@@ -225,7 +225,7 @@
         useful on the moin configuration entries though.
 
    Configuration options
-   
+
        cfg.acl_rights_default
            It is is ONLY used when no other ACLs are given.
            Default: "Known:read,write,delete All:read,write",
@@ -239,7 +239,7 @@
            When the page has ACL entries, this will be inserted AFTER
            any page entries.
            Default: ""
-       
+
        cfg.acl_rights_valid
            These are the acceptable (known) rights (and the place to
            extend, if necessary).
--- a/MoinMoin/security/_tests/test_security.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/security/_tests/test_security.py	Mon Jul 02 23:33:20 2007 +0200
@@ -216,17 +216,17 @@
             ('Admin2',              ('read', 'write', 'admin', 'revert', 'delete')),
             ('Admin3',              ('read', 'write', 'admin')),
             ('JoeDoe',              ('read', 'write')),
-            ('SomeGuy',             ('read',)),
+            ('SomeGuy',             ('read', )),
             # Extended names or mix of extended and CamelCase
-            ('name with spaces',    ('read','write',)),
-            ('another one',         ('read','write',)),
-            ('CamelCase',           ('read','write',)),
-            ('extended name',       ('read','write',)),
+            ('name with spaces',    ('read', 'write', )),
+            ('another one',         ('read', 'write', )),
+            ('CamelCase',           ('read', 'write', )),
+            ('extended name',       ('read', 'write', )),
             # Blocking bad guys
             ('BadGuy',              ()),
             # All other users - every one not mentioned in the acl lines
-            ('All',                 ('read',)),
-            ('Anonymous',           ('read',)),
+            ('All',                 ('read', )),
+            ('Anonymous',           ('read', )),
             )
 
         # Check rights
@@ -268,7 +268,7 @@
                 file(os.path.join(revisionsDir, current), 'w').write(text)
             except Exception, err:
                 py.test.skip("Can not be create test page: %s" % err)
-    
+
             assert not self.request.user.may.write(pagename)
         finally:
             if os.path.exists(path):
--- a/MoinMoin/security/autoadmin.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/security/autoadmin.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,7 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 """
     MoinMoin - SecurityPolicy implementing auto admin rights for some users and some groups.
-    
+
     AutoAdminGroup page contains users which automatically get admin rights
     on their homepage and subpages of it. E.g. if ThomasWaldmann is in
     AutoAdminGroup (or in a group contained in AutoAdminGroup), he gets
@@ -12,7 +12,7 @@
     E.g. if SomeProject/AdminGroup is in AutoAdminGroup and ThomasWaldmann is
     in SomeProject/AdminGroup, then ThomasWaldmann gets admin rights on pages
     SomeProject and SomeProject/*.
-    
+
     Further, it can autocreate the UserName/XxxxGroup (see grouppages var) when
     a user save his homepage. Alternatively, this could be also done manually by
     the user using *Template pages.
@@ -35,7 +35,7 @@
      * see if there is a HomepageTemplate with a prepared ACL line and some
        other magic already on it. It is a good idea to have your homepage
        read- and writeable for everybody as a means of open communication.
-       
+
      * For creating personal (or private) subpages of your homepage, use the
        ReadWritePageTemplate, ReadPageTemplate or PrivatePageTemplate.
        They usually have some prepared ACL line on them, e.g.:
@@ -45,7 +45,7 @@
        YourName/ReadGroup) for allowing read/write or read-only access to
        Now you only have to maintain 2 subpages (maybe they even have been
        auto- created for you)
-     
+
     Usage (for project people):
      * see if there is some <ProjectName>Template with a prepared ACL line for
        your project pages and use it for creating new subpages.
--- a/MoinMoin/server/CGI.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/server/CGI.py	Mon Jul 02 23:33:20 2007 +0200
@@ -9,12 +9,12 @@
     Minimal usage:
 
         from MoinMoin.server.CGI import CgiConfig, run
-        
+
         class Config(CgiConfig):
             pass
 
         run(Config)
-        
+
     See more options in CgiConfig class.
 
     @copyright: 2006 MoinMoin:ThomasWaldmann
@@ -43,9 +43,9 @@
 
 def run(configClass):
     """ Create and run a Cgi Request
-    
+
     See CgiConfig for available options
-    
+
     @param configClass: config class
     """
 
--- a/MoinMoin/server/STANDALONE.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/server/STANDALONE.py	Mon Jul 02 23:33:20 2007 +0200
@@ -8,18 +8,18 @@
     It is not well tested in public wikis with heavy load. In these case
     you might want to use twisted, fast cgi or mod python, or if you
     can't use those, cgi.
-        
+
     Minimal usage:
 
         from MoinMoin.server.STANDALONE import StandaloneConfig, run
-        
+
         class Config(StandaloneConfig):
             docs = '/usr/share/moin/wiki/htdocs'
             user = 'www-data'
             group = 'www-data'
-            
+
         run(Config)
-        
+
     See more options in StandaloneConfig class.
 
     For security, the server will not run as root. If you try to run it
@@ -49,7 +49,7 @@
 
 class SimpleServer(BaseHTTPServer.HTTPServer):
     """ Simplest server, serving one request after another
-    
+
     This server is good for personal wiki, or when lowest memory
     footprint is needed.
     """
@@ -96,11 +96,11 @@
 
 
 class ThreadingServer(SimpleServer):
-    """ Serve each request in a new thread 
-    
+    """ Serve each request in a new thread
+
     This server is used since release 1.3 and seems to work nice with
     little load.
-    
+
     From release 1.3.5 there is a thread limit, that should help to
     limit the load on the server.
     """
@@ -114,7 +114,7 @@
 
     def process_request(self, request, client_address):
         """ Start a new thread to process the request
-        
+
         If the thread limit has been reached, wait on the lock. The
         next thread will notify when finished.
         """
@@ -132,8 +132,8 @@
             self.lock.release()
 
     def process_request_thread(self, request, client_address):
-        """ Called for each request on a new thread 
-        
+        """ Called for each request on a new thread
+
         Notify the main thread on the end of each request.
         """
         try:
@@ -150,7 +150,7 @@
 
 
 class ThreadPoolServer(SimpleServer):
-    """ Threading server using a pool of threads 
+    """ Threading server using a pool of threads
 
     This is a new experimental server, using a pool of threads instead
     of creating new thread for each request. This is similar to Apache
@@ -158,7 +158,7 @@
 
     This server is 5 times faster than ThreadingServer for static
     files, and about the same for wiki pages.
-    
+
     TODO: sometimes the server won't exit on Conrol-C, and continue to
     run with few threads (you can kill it with kill -9). Same problem
     exist with the twisted server. When the problem is finally solved,
@@ -184,8 +184,8 @@
         SimpleServer.serve_forever(self)
 
     def process_request(self, request, client_address):
-        """ Called for each request 
-        
+        """ Called for each request
+
         Insert the request into the queue. If the queue is full, wait
         until one of the request threads pop a request. During the wait,
         new connections might be dropped.
@@ -202,8 +202,8 @@
             self.lock.release()
 
     def serve_forever_thread(self):
-        """ The main loop of request threads 
-        
+        """ The main loop of request threads
+
         Pop a request from the queue and process it.
         """
         while not self._abort:
@@ -216,8 +216,8 @@
         # sys.stderr.write('thread exiting...\n')
 
     def pop_request(self):
-        """ Pop a request from the queue 
-        
+        """ Pop a request from the queue
+
         If the queue is empty, wait for notification. If the queue was
         full, notify the main thread which may be waiting.
         """
@@ -257,11 +257,11 @@
 
 
 class ForkingServer(SocketServer.ForkingMixIn, SimpleServer):
-    """ Serve each request in a new process 
-    
+    """ Serve each request in a new process
+
     This is new untested server, first tests show rather pathetic cgi
     like performance. No data is cached between requests.
-    
+
     The mixin has its own process limit.
     """
     max_children = 10
@@ -309,7 +309,7 @@
     do_GET = do_ALL
     do_HEAD = do_ALL
 
-    # -------------------------------------------------------------------    
+    # -------------------------------------------------------------------
     # Serve methods
 
     def serve_static_file(self):
@@ -365,7 +365,7 @@
 
         if bad_uri:
             self.log_error("Detected bad request URI '%s', translated to '%s'"
-                           % (uri, path,))
+                           % (uri, path, ))
         return path
 
     def end_headers(self):
@@ -378,7 +378,7 @@
 
     def copyfile(self, source, outputfile):
         """Copy all data between two file objects.
-        
+
         Modify the base class method to change the buffer size. Test
         shows that for the typical static files we serve, 8K buffer is
         faster than the default 16K buffer.
@@ -446,7 +446,7 @@
             if self.handshake(tls_connection):
                 self.RequestHandlerClass(tls_connection, client_address, self)
             else:
-                # This will probably fail because the TLSConnection has 
+                # This will probably fail because the TLSConnection has
                 # already written SSL stuff to the socket. But not sure what
                 # else we should do.
                 SecureRequestRedirect(sock, client_address, self)
@@ -490,12 +490,12 @@
 
     fname = config.pycallgraph_output
     if fname:
-         import pycallgraph
-         if fname.endswith('.png'):
-             pycallgraph.make_dot_graph(fname)
-         elif fname.endswith('.dot'):
-             pycallgraph.save_dot(fname)
-         
+        import pycallgraph
+        if fname.endswith('.png'):
+            pycallgraph.make_dot_graph(fname)
+        elif fname.endswith('.dot'):
+            pycallgraph.save_dot(fname)
+
     if httpd:
         httpd.die()
 
@@ -512,8 +512,8 @@
 
 
 def makeServer(config):
-    """ Create a new server, based on the the platform capabilities 
-    
+    """ Create a new server, based on the the platform capabilities
+
     Try to create the server class specified in the config. If threads
     are not available, fallback to ForkingServer. If fork is not
     available, fallback to a SimpleServer.
@@ -563,9 +563,9 @@
 
 def run(configClass):
     """ Create and run a moin server
-    
+
     See StandaloneConfig for available options
-    
+
     @param configClass: config class
     """
     # Run only once!
--- a/MoinMoin/server/TWISTED.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/server/TWISTED.py	Mon Jul 02 23:33:20 2007 +0200
@@ -7,12 +7,12 @@
     Minimal usage:
 
         from MoinMoin.server.TWISTED import TwistedConfig, makeApp
-        
+
         class Config(TwistedConfig):
             docs = '/usr/share/moin/wiki/htdocs'
             user = 'www-data'
             group = 'www-data'
-            
+
         application = makeApp(Config)
 
     Then run this code with twistd -y yourcode.py. See moin_twisted script.
--- a/MoinMoin/server/daemon.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/server/daemon.py	Mon Jul 02 23:33:20 2007 +0200
@@ -54,8 +54,8 @@
 
 
 class Daemon:
-    """ A background process 
-    
+    """ A background process
+
     Represent a background process, which may be running or not. The
     process can be started, stopped, restarted or killed.
     """
@@ -63,7 +63,7 @@
 
     def __init__(self, name, function, *args, **kw):
         """ Create a daemon
-        
+
         @param name: name of the process (determines pid filename, too)
         @param function: the server main function, will block until the
             server is done.
@@ -97,8 +97,8 @@
             self.removePID()
 
     def do_stop(self):
-        """ Stop the daemon process 
-        
+        """ Stop the daemon process
+
         Terminate or raise an error we can't handle here. On success,
         the pid file will be cleaned by the terminated process.
         """
@@ -109,7 +109,7 @@
 
     def do_kill(self):
         """ Kill the daemon process
-        
+
         Kill or raise an error which we can't handle here. Clean the
         pid file for the killed process.
         """
@@ -163,7 +163,7 @@
 
     def readPID(self):
         """ Return the pid from the pid file
-        
+
         If there is no pid file, return None. If pid file is corrupted,
         remove it. If its not readable, raise.
         """
@@ -180,7 +180,7 @@
 
     def daemonize(self):
         """ Make the current process a daemon
-        
+
         See http://www.erlenstar.demon.co.uk/unix/faq_toc.html#TOC16
         """
         if os.fork():   # launch child and...
@@ -218,8 +218,8 @@
 
 
 class DaemonScript(Daemon):
-    """ A script controlling a daemon 
-    
+    """ A script controlling a daemon
+
     TODO: add --pid-dir option?
     """
 
--- a/MoinMoin/stats/chart.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/stats/chart.py	Mon Jul 02 23:33:20 2007 +0200
@@ -26,7 +26,7 @@
     def __init__(self, data, color='black'):
         """
         Create a data set.
-        
+
         @param data: tuple / list of numbers
         @param color: rendering color (triple, '#RRGGBB' or color name)
         """
--- a/MoinMoin/stats/hitcounts.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/stats/hitcounts.py	Mon Jul 02 23:33:20 2007 +0200
@@ -166,7 +166,7 @@
 
     for i in xrange(len(days)-1, -1, -1):
         d, v, e = days[i], views[i], edits[i]
-        # sum up views and edits to step days 
+        # sum up views and edits to step days
         sd += 1
         cnt += 1
         sv += v
--- a/MoinMoin/stats/useragents.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/stats/useragents.py	Mon Jul 02 23:33:20 2007 +0200
@@ -4,7 +4,7 @@
 
     This macro creates a pie chart of the type of user agents
     accessing the wiki.
-    
+
     TODO: should be refactored after hitcounts.
 
     @copyright: 2002-2004 Juergen Hermann <jh@web.de>
--- a/MoinMoin/theme/__init__.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/theme/__init__.py	Mon Jul 02 23:33:20 2007 +0200
@@ -19,11 +19,11 @@
 
 
 class ThemeBase:
-    """ Base class for themes 
-    
-    This class supply all the standard template that sub classes can 
-    use without rewriting the same code. If you want to change certain 
-    elements, override them. 
+    """ Base class for themes
+
+    This class supply all the standard template that sub classes can
+    use without rewriting the same code. If you want to change certain
+    elements, override them.
     """
 
     name = 'base'
@@ -36,26 +36,26 @@
         # key         alt                        icon filename      w   h
         # ------------------------------------------------------------------
         # navibar
-        'help':       ("%(page_help_contents)s", "moin-help.png",   12, 11),
-        'find':       ("%(page_find_page)s",     "moin-search.png", 12, 12),
-        'diff':       (_("Diffs"),               "moin-diff.png",   15, 11),
-        'info':       (_("Info"),                "moin-info.png",   12, 11),
-        'edit':       (_("Edit"),                "moin-edit.png",   12, 12),
-        'unsubscribe':(_("Unsubscribe"),         "moin-unsubscribe.png",  14, 10),
-        'subscribe':  (_("Subscribe"),           "moin-subscribe.png",14, 10),
-        'raw':        (_("Raw"),                 "moin-raw.png",    12, 13),
-        'xml':        (_("XML"),                 "moin-xml.png",    20, 13),
-        'print':      (_("Print"),               "moin-print.png",  16, 14),
-        'view':       (_("View"),                "moin-show.png",   12, 13),
-        'home':       (_("Home"),                "moin-home.png",   13, 12),
-        'up':         (_("Up"),                  "moin-parent.png", 15, 13),
+        'help':        ("%(page_help_contents)s", "moin-help.png",   12, 11),
+        'find':        ("%(page_find_page)s",     "moin-search.png", 12, 12),
+        'diff':        (_("Diffs"),               "moin-diff.png",   15, 11),
+        'info':        (_("Info"),                "moin-info.png",   12, 11),
+        'edit':        (_("Edit"),                "moin-edit.png",   12, 12),
+        'unsubscribe': (_("Unsubscribe"),         "moin-unsubscribe.png", 14, 10),
+        'subscribe':   (_("Subscribe"),           "moin-subscribe.png", 14, 10),
+        'raw':         (_("Raw"),                 "moin-raw.png",    12, 13),
+        'xml':         (_("XML"),                 "moin-xml.png",    20, 13),
+        'print':       (_("Print"),               "moin-print.png",  16, 14),
+        'view':        (_("View"),                "moin-show.png",   12, 13),
+        'home':        (_("Home"),                "moin-home.png",   13, 12),
+        'up':          (_("Up"),                  "moin-parent.png", 15, 13),
         # FileAttach
         'attach':     ("%(attach_count)s",       "moin-attach.png",  7, 15),
         # RecentChanges
         'rss':        (_("[RSS]"),               "moin-rss.png",    24, 24),
-        'deleted':    (_("[DELETED]"),           "moin-deleted.png",60, 12),
-        'updated':    (_("[UPDATED]"),           "moin-updated.png",60, 12),
-        'renamed':    (_("[RENAMED]"),           "moin-renamed.png",60, 12),
+        'deleted':    (_("[DELETED]"),           "moin-deleted.png", 60, 12),
+        'updated':    (_("[UPDATED]"),           "moin-updated.png", 60, 12),
+        'renamed':    (_("[RENAMED]"),           "moin-renamed.png", 60, 12),
         'conflict':   (_("[CONFLICT]"),          "moin-conflict.png", 60, 12),
         'new':        (_("[NEW]"),               "moin-new.png",    31, 12),
         'diffrc':     (_("[DIFF]"),              "moin-diff.png",   15, 11),
@@ -149,7 +149,7 @@
     def __init__(self, request):
         """
         Initialize the theme object.
-        
+
         @param request: the request object
         """
         self.request = request
@@ -168,7 +168,7 @@
     def emit_custom_html(self, html):
         """
         generate custom HTML code in `html`
-        
+
         @param html: a string or a callable object, in which case
                      it is called and its return value is used
         @rtype: string
@@ -185,7 +185,7 @@
         The logo contain an image and or text or any html markup the
         admin inserted in the config file. Everything it enclosed inside
         a div with id="logo".
-        
+
         @rtype: unicode
         @return: logo html
         """
@@ -198,7 +198,7 @@
 
     def interwiki(self, d):
         """ Assemble the interwiki name display, linking to page_front_page
-        
+
         @param d: parameter dictionary
         @rtype: string
         @return: interwiki html
@@ -214,7 +214,7 @@
 
     def title(self, d):
         """ Assemble the title (now using breadcrumbs)
-        
+
         @param d: parameter dictionary
         @rtype: string
         @return: title html
@@ -250,7 +250,7 @@
 
     def username(self, d):
         """ Assemble the username / userprefs link
-        
+
         @param d: parameter dictionary
         @rtype: unicode
         @return: username html
@@ -301,7 +301,7 @@
         the [page title] or [url title] syntax. In this case, we don't
         use localization, and the links goes to page or to the url, not
         the localized version of page.
-        
+
         Supported syntax:
             * PageName
             * WikiName:PageName
@@ -376,14 +376,14 @@
 
     def shortenPagename(self, name):
         """ Shorten page names
-        
+
         Shorten very long page names that tend to break the user
         interface. The short name is usually fine, unless really stupid
         long names are used (WYGIWYD).
 
         If you don't like to do this in your theme, or want to use
         different algorithm, override this method.
-        
+
         @param name: page name, unicode
         @rtype: unicode
         @return: shortened version.
@@ -510,7 +510,7 @@
         This is the central routine for making <img> tags for icons!
         All icons stuff except the top left logo and search field icons are
         handled here.
-        
+
         @param icon: icon id (dict key)
         @param vars: ...
         @rtype: string
@@ -551,7 +551,7 @@
         """ Assemble the msg display
 
         Display a message with a widget or simple strings with a clear message link.
-        
+
         @param d: parameter dictionary
         @rtype: unicode
         @return: msg display html
@@ -573,7 +573,7 @@
 
     def trail(self, d):
         """ Assemble page trail
-        
+
         @param d: parameter dictionary
         @rtype: unicode
         @return: trail html
@@ -612,7 +612,7 @@
 
     def html_stylesheets(self, d):
         """ Assemble html head stylesheet links
-        
+
         @param d: parameter dictionary
         @rtype: string
         @return: stylesheets links
@@ -683,7 +683,7 @@
         Since page information uses translated text, it uses the ui
         language and direction. It looks strange sometimes, but
         translated text using page direction looks worse.
-        
+
         @param page: current page
         @rtype: unicode
         @return: page last edit information
@@ -710,7 +710,7 @@
     def searchform(self, d):
         """
         assemble HTML code for the search forms
-        
+
         @param d: parameter dictionary
         @rtype: unicode
         @return: search form html
@@ -755,7 +755,7 @@
     def showversion(self, d, **keywords):
         """
         assemble HTML code for copyright and version display
-        
+
         @param d: parameter dictionary
         @rtype: string
         @return: copyright and version display html
@@ -803,13 +803,13 @@
 
     def rsshref(self, page):
         """ Create rss href, used for rss button and head link
-        
+
         @rtype: unicode
         @return: rss href
         """
         request = self.request
         url = page.url(request, querystr={
-                'action':'rss_rc', 'ddiffs': '1', 'unique': '1', }, escape=0, relative=False)
+                'action': 'rss_rc', 'ddiffs': '1', 'unique': '1', }, escape=0, relative=False)
         return url
 
     def rsslink(self, d):
@@ -832,7 +832,7 @@
 
     def html_head(self, d):
         """ Assemble html head
-        
+
         @param d: parameter dictionary
         @rtype: unicode
         @return: html head
@@ -864,7 +864,7 @@
 
     def actionsMenu(self, page):
         """ Create actions menu list and items data dict
-        
+
         The menu will contain the same items always, but items that are
         not available will be disabled (some broken browsers will let
         you select disabled options though).
@@ -875,7 +875,7 @@
 
         TODO: Move actionsMenuInit() into body onload - requires that the theme will render body,
               it is currently done in wikiutil/page.
-        
+
         @param page: current page, Page object
         @rtype: unicode
         @return: actions menu html fragment
@@ -962,7 +962,7 @@
 
         # Add custom actions not in the standard menu, except for
         # some actions like AttachFile (we have them on top level)
-        more = [item for item in available if not item in titles and not item in ('AttachFile',)]
+        more = [item for item in available if not item in titles and not item in ('AttachFile', )]
         more.sort()
         if more:
             # Add separator
@@ -972,9 +972,9 @@
             # Add more actions (all enabled)
             for action in more:
                 data = {'action': action, 'disabled': ''}
-                # Always add spaces: AttachFile -> Attach File 
+                # Always add spaces: AttachFile -> Attach File
                 # XXX do not create page just for using split_title -
-                # creating pages for non-existant does 2 storage lookups 
+                # creating pages for non-existant does 2 storage lookups
                 #title = Page(request, action).split_title(force=1)
                 title = action
                 # Use translated version if available
@@ -1016,7 +1016,7 @@
         """ Assemble the page edit bar.
 
         Create html on first call, then return cached html.
-                
+
         @param d: parameter dictionary
         @rtype: unicode
         @return: iconbar html
@@ -1060,7 +1060,7 @@
         return False
 
     def editbarItems(self, page):
-        """ Return list of items to show on the editbar 
+        """ Return list of items to show on the editbar
 
         This is separate method to make it easy to customize the
         edtibar in sub classes.
@@ -1076,7 +1076,7 @@
             elif editbar_item == 'Comments':
                 # we just use <a> to get same style as other links, but we add some dummy
                 # link target to get correct mouseover pointer appearance. return false
-                # keeps the browser away from jumping to the link target:: 
+                # keeps the browser away from jumping to the link target::
                 editbar_actions.append('<a href="#" class="toggleCommentsButton" onClick="toggleComments();return false;">%s</a>' % _('Comments'))
             elif editbar_item == 'Edit':
                 editbar_actions.append(self.editorLink(page))
@@ -1107,10 +1107,10 @@
         return page.pi['format'] == 'wiki'
 
     def editorLink(self, page):
-        """ Return a link to the editor 
-        
+        """ Return a link to the editor
+
         If the user can't edit, return a disabled edit link.
-        
+
         If the user want to show both editors, it will display "Edit
         (Text)", otherwise as "Edit".
         """
@@ -1147,7 +1147,7 @@
 
     def guiEditorScript(self, d):
         """ Return a script that set the gui editor link variables
-        
+
         The link will be created only when javascript is enabled and
         the browser is compatible with the editor.
         """
@@ -1165,7 +1165,7 @@
 var gui_editor_link_href = "%(url)s";
 var gui_editor_link_text = "%(text)s";
 //-->
-</script>        
+</script>
 """ % {'url': page.url(self.request, querystr={'action': 'edit', 'editor': 'gui', }, relative=False),
        'text': _('Edit (GUI)', formatted=False),
       }
@@ -1185,7 +1185,7 @@
 
     def subscribeLink(self, page):
         """ Return subscribe/unsubscribe link to valid users
-        
+
         @rtype: unicode
         @return: subscribe or unsubscribe link
         """
@@ -1201,7 +1201,7 @@
 
     def quicklinkLink(self, page):
         """ Return add/remove quicklink link
-        
+
         @rtype: unicode
         @return: link to add or remove a quicklink
         """
@@ -1224,15 +1224,15 @@
 
     def startPage(self):
         """ Start page div with page language and direction
-        
+
         @rtype: unicode
         @return: page div with language and direction attribtues
         """
         return u'<div id="page"%s>\n' % self.content_lang_attr()
 
     def endPage(self):
-        """ End page div 
-        
+        """ End page div
+
         Add an empty page bottom div to prevent floating elements to
         float out of the page bottom over the footer.
         """
@@ -1242,10 +1242,10 @@
 
     def header(self, d, **kw):
         """ Assemble page header
-        
+
         Default behavior is to start a page div. Sub class and add
         footer items.
-        
+
         @param d: parameter dictionary
         @rtype: string
         @return: page header html
@@ -1256,7 +1256,7 @@
 
     def footer(self, d, **keywords):
         """ Assemble page footer
-        
+
         Default behavior is to end page div. Sub class and add
         footer items.
 
@@ -1272,7 +1272,7 @@
     def recentchanges_entry(self, d):
         """
         Assemble a single recentchanges entry (table row)
-        
+
         @param d: parameter dictionary
         @rtype: string
         @return: recentchanges entry html
@@ -1317,7 +1317,7 @@
     def recentchanges_daybreak(self, d):
         """
         Assemble a rc daybreak indication (table row)
-        
+
         @param d: parameter dictionary
         @rtype: string
         @return: recentchanges daybreak html
@@ -1334,7 +1334,7 @@
     def recentchanges_header(self, d):
         """
         Assemble the recentchanges header (intro + open table)
-        
+
         @param d: parameter dictionary
         @rtype: string
         @return: recentchanges header html
@@ -1368,7 +1368,7 @@
                             str(day),
                             self.request.formatter, rel='nofollow'))
             days = ' | '.join(days)
-            html += (_("Show %s days.") % (days,))
+            html += (_("Show %s days.") % (days, ))
 
         if d['rc_update_bookmark']:
             html += " %(rc_update_bookmark)s %(rc_curr_bookmark)s" % d
@@ -1381,7 +1381,7 @@
     def recentchanges_footer(self, d):
         """
         Assemble the recentchanges footer (close table)
-        
+
         @param d: parameter dictionary
         @rtype: string
         @return: recentchanges footer html
@@ -1528,9 +1528,9 @@
         output.append('<link rel="Start" href="%s/%s">\n' % (scriptname, wikiutil.quoteWikinameURL(page_front_page)))
         if pagename:
             output.append('<link rel="Alternate" title="%s" href="%s/%s?action=raw">\n' % (
-                _('Wiki Markup'), scriptname, pagename_quoted,))
+                _('Wiki Markup'), scriptname, pagename_quoted, ))
             output.append('<link rel="Alternate" media="print" title="%s" href="%s/%s?action=print">\n' % (
-                _('Print View'), scriptname, pagename_quoted,))
+                _('Print View'), scriptname, pagename_quoted, ))
 
             # !!! currently disabled due to Mozilla link prefetching, see
             # http://www.mozilla.org/projects/netlib/Link_Prefetching_FAQ.html
--- a/MoinMoin/theme/classic.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/theme/classic.py	Mon Jul 02 23:33:20 2007 +0200
@@ -25,7 +25,7 @@
 
     def footer(self, d, **keywords):
         """ Assemble wiki footer
-        
+
         @param d: parameter dictionary
         @keyword ...:...
         @rtype: unicode
@@ -60,7 +60,7 @@
     def iconbar(self, d):
         """
         Assemble the iconbar
-        
+
         @param d: parameter dictionary
         @rtype: string
         @return: iconbar html
@@ -84,7 +84,7 @@
     def header(self, d):
         """
         Assemble page header
-        
+
         @param d: parameter dictionary
         @rtype: string
         @return: page header html
@@ -131,7 +131,7 @@
     def editorheader(self, d):
         """
         Assemble page header for editor
-        
+
         @param d: parameter dictionary
         @rtype: string
         @return: page header html
@@ -162,7 +162,7 @@
     def edit_link(self, d, **keywords):
         """
         Assemble EditText link (or indication that page cannot be edited)
-        
+
         @param d: parameter dictionary
         @rtype: string
         @return: edittext link html
@@ -173,7 +173,7 @@
     def availableactions(self, d):
         """
         assemble HTML code for the available actions
-        
+
         @param d: parameter dictionary
         @rtype: string
         @return: available actions html
@@ -188,7 +188,7 @@
             available = list(available)
             available.sort()
             for action in available:
-                # Always add spaces: AttachFile -> Attach File 
+                # Always add spaces: AttachFile -> Attach File
                 # XXX do not make a page object just for split_title
                 #title = Page(request, action).split_title(force=1)
                 title = action
@@ -215,7 +215,7 @@
 def execute(request):
     """
     Generate and return a theme object
-        
+
     @param request: the request object
     @rtype: MoinTheme
     @return: Theme object
--- a/MoinMoin/theme/modern.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/theme/modern.py	Mon Jul 02 23:33:20 2007 +0200
@@ -14,7 +14,7 @@
 
     def header(self, d, **kw):
         """ Assemble wiki header
-        
+
         @param d: parameter dictionary
         @rtype: unicode
         @return: page header html
@@ -50,7 +50,7 @@
 
     def editorheader(self, d, **kw):
         """ Assemble wiki header for editor
-        
+
         @param d: parameter dictionary
         @rtype: unicode
         @return: page header html
@@ -75,7 +75,7 @@
 
     def footer(self, d, **keywords):
         """ Assemble wiki footer
-        
+
         @param d: parameter dictionary
         @keyword ...:...
         @rtype: unicode
@@ -106,7 +106,7 @@
 def execute(request):
     """
     Generate and return a theme object
-        
+
     @param request: the request object
     @rtype: MoinTheme
     @return: Theme object
--- a/MoinMoin/theme/rightsidebar.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/theme/rightsidebar.py	Mon Jul 02 23:33:20 2007 +0200
@@ -6,7 +6,7 @@
     Later it was rewritten by Nir Soffer for MoinMoin release 1.3.
 
     @copyright: 2005 Nir Soffer
-    @license: GNU GPL, see COPYING for details.  
+    @license: GNU GPL, see COPYING for details.
 """
 
 from MoinMoin.theme import ThemeBase
@@ -54,7 +54,7 @@
     def header(self, d):
         """
         Assemble page header
-        
+
         @param d: parameter dictionary
         @rtype: string
         @return: page header html
@@ -96,7 +96,7 @@
     def editorheader(self, d):
         """
         Assemble page header for editor
-        
+
         @param d: parameter dictionary
         @rtype: string
         @return: page header html
@@ -133,7 +133,7 @@
 
     def footer(self, d, **keywords):
         """ Assemble wiki footer
-        
+
         @param d: parameter dictionary
         @keyword ...:...
         @rtype: unicode
@@ -162,7 +162,7 @@
 
 def execute(request):
     """ Generate and return a theme object
-        
+
     @param request: the request object
     @rtype: MoinTheme
     @return: Theme object
--- a/MoinMoin/user.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/user.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,7 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 """
     MoinMoin - User Accounts
-    
+
     This module contains functions to access user accounts (list all users, get
     some specific user). User instances are used to access the user profile of
     some specific user (name, password, email, bookmark, trail, settings, ...).
@@ -52,7 +52,7 @@
     """ Searches for an user with a particular e-mail address and returns it. """
     filter_func = lambda user: user.valid and user.email.lower() == email_address.lower()
     return get_by_filter(request, filter_func)
-        
+
 def get_by_jabber_id(request, jabber_id):
     """ Searches for an user with a perticular jabber id and returns it. """
     filter_func = lambda user: user.valid and user.jid.lower() == jabber_id.lower()
@@ -111,7 +111,7 @@
 
 def getUserIdentification(request, username=None):
     """ Return user name or IP or '<unknown>' indicator.
-    
+
     @param request: the request object
     @param username: (optional) user name
     @rtype: string
@@ -162,7 +162,7 @@
     in user names.
 
     Prevent using ':' and ',' which are reserved by acl.
-    
+
     @param name: user name, unicode
     @rtype: unicode
     @return: user name that can be used in acl lines
@@ -173,7 +173,7 @@
     # Strip non alpha numeric characters (except username_allowedchars), keep white space
     name = ''.join([c for c in name if c.isalnum() or c.isspace() or c in username_allowedchars])
 
-    # Normalize white space. Each name can contain multiple 
+    # Normalize white space. Each name can contain multiple
     # words separated with only one space.
     name = ' '.join(name.split())
 
@@ -193,7 +193,7 @@
     """ Encode list of items in user data file
 
     Items are separated by '\t' characters.
-    
+
     @param items: list unicode strings
     @rtype: unicode
     @return: list encoded as unicode
@@ -210,7 +210,7 @@
 
 def decodeList(line):
     """ Decode list of items from user data file
-    
+
     @param line: line containing list of items, encoded with encodeList
     @rtype: list of unicode strings
     @return: list of items in encoded in line
@@ -228,7 +228,7 @@
 
     Items are separated by '\t' characters.
     Each item is key:value.
-    
+
     @param items: dict of unicode:unicode
     @rtype: unicode
     @return: dict encoded as unicode
@@ -242,7 +242,7 @@
 
 def decodeDict(line):
     """ Decode dict of key:value pairs from user data file
-    
+
     @param line: line containing a dict, encoded with encodeDict
     @rtype: dict
     @return: dict  unicode:unicode items
@@ -251,7 +251,7 @@
     for item in line.split('\t'):
         item = item.strip()
         if not item:
-            continue        
+            continue
         key, value = item.split(':', 1)
         items[key] = value
     return items
@@ -262,7 +262,7 @@
 
     def __init__(self, request, id=None, name="", password=None, auth_username="", **kw):
         """ Initialize User object
-        
+
         TODO: when this gets refactored, use "uid" not builtin "id"
 
         @param request: the request object
@@ -376,7 +376,7 @@
 
     def __filename(self):
         """ Get filename of the user's file on disk
-        
+
         @rtype: string
         @return: full path and filename of user account file
         """
@@ -384,7 +384,7 @@
 
     def exists(self):
         """ Do we have a user account for this user?
-        
+
         @rtype: bool
         @return: true, if we have a user account
         """
@@ -397,7 +397,7 @@
 
         This loads all member variables, except "id" and "valid" and
         those starting with an underscore.
-        
+
         @param check_pass: If 1, then self.enc_password must match the
                            password in the user account file.
         """
@@ -604,7 +604,7 @@
 
     def getTime(self, tm):
         """ Get time in user's timezone.
-        
+
         @param tm: time (UTC UNIX timestamp)
         @rtype: int
         @return: tm tuple adjusted for user's timezone
@@ -638,7 +638,7 @@
 
     def setBookmark(self, tm):
         """ Set bookmark timestamp.
-        
+
         @param tm: timestamp
         """
         if self.valid:
@@ -649,7 +649,7 @@
 
     def getBookmark(self):
         """ Get bookmark timestamp.
-        
+
         @rtype: int
         @return: bookmark timestamp or None
         """
@@ -683,7 +683,7 @@
 
     def getSubscriptionList(self):
         """ Get list of pages this user has subscribed to
-        
+
         @rtype: list
         @return: pages this user has subscribed to
         """
@@ -691,13 +691,13 @@
 
     def isSubscribedTo(self, pagelist):
         """ Check if user subscription matches any page in pagelist.
-        
+
         The subscription list may contain page names or interwiki page
         names. e.g 'Page Name' or 'WikiName:Page_Name'
-        
+
         TODO: check if it's fast enough when getting called for many
               users from page.getSubscribersList()
-        
+
         @param pagelist: list of pages to check for subscription
         @rtype: bool
         @return: if user is subscribed any page in pagelist
@@ -744,7 +744,7 @@
         if pagename not in self.subscribed_pages:
             self.subscribed_pages.append(pagename)
             self.save()
-            
+
             # Send a notification
             from MoinMoin.events import SubscribedToPageEvent, send_event
             e = SubscribedToPageEvent(self._request, pagename, self.name)
@@ -799,7 +799,7 @@
 
     def isQuickLinkedTo(self, pagelist):
         """ Check if user quicklink matches any page in pagelist.
-        
+
         @param pagelist: list of pages to check for quicklinks
         @rtype: bool
         @return: if user has quicklinked any page in pagelist
@@ -817,8 +817,8 @@
         return False
 
     def addQuicklink(self, pagename):
-        """ Adds a page to the user quicklinks 
-        
+        """ Adds a page to the user quicklinks
+
         If the wiki has an interwiki name, all links are saved as
         interwiki names. If not, as simple page name.
 
@@ -846,10 +846,10 @@
         return changed
 
     def removeQuicklink(self, pagename):
-        """ Remove a page from user quicklinks 
-        
+        """ Remove a page from user quicklinks
+
         Remove both interwiki and simple name from quicklinks.
-        
+
         @param pagename: page name
         @type pagename: unicode
         @rtype: bool
@@ -869,7 +869,7 @@
         return changed
 
     def _interWikiName(self, pagename):
-        """ Return the inter wiki name of a page name 
+        """ Return the inter wiki name of a page name
 
         @param pagename: page name
         @type pagename: unicode
@@ -884,7 +884,7 @@
 
     def addTrail(self, page):
         """ Add page to trail.
-        
+
         @param page: the page (object) to add to the trail
         """
         if not self.valid or self.show_page_trail or self.remember_last_visit:
@@ -919,7 +919,7 @@
 
     def getTrail(self):
         """ Return list of recently visited pages.
-        
+
         @rtype: list
         @return: pages in trail
         """
@@ -971,10 +971,10 @@
 
     def signature(self):
         """ Return user signature using wiki markup
-        
+
         Users sign with a link to their homepage.
         Visitors return their host address.
-        
+
         TODO: The signature use wiki format only, for example, it will
         not create a link when using rst format. It will also break if
         we change wiki syntax.
--- a/MoinMoin/userform.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/userform.py	Mon Jul 02 23:33:20 2007 +0200
@@ -21,7 +21,7 @@
 def savedata(request):
     """ Handle POST request of the user preferences form.
 
-    Return error msg or None.  
+    Return error msg or None.
     """
     return UserSettingsHandler(request).handle_form()
 
@@ -134,10 +134,10 @@
 
         # save data
         theuser.save()
-        
+
         user_created = events.UserCreatedEvent(self.request, theuser)
         events.send_event(user_created)
-        
+
         if form.has_key('create_and_mail'):
             theuser.mailAccountData()
 
@@ -234,20 +234,20 @@
                 other = user.get_by_email_address(self.request, theuser.email)
                 if other is not None and other.id != theuser.id:
                     return _("This email already belongs to somebody else.")
-                    
+
         if not 'jid' in theuser.auth_attribs:
             # try to get the jid
             jid = wikiutil.clean_input(form.get('jid', "")).strip()
-            
+
             jid_changed = theuser.jid != jid
-            previous_jid = theuser.jid           
+            previous_jid = theuser.jid
             theuser.jid = jid
-            
+
             if theuser.jid and self.request.cfg.user_jid_unique:
                 other = user.get_by_jabber_id(self.request, theuser.jid)
                 if other is not None and other.id != theuser.id:
                     return _("This jabber id already belongs to somebody else.")
-            
+
             if jid_changed:
                 set_event = events.JabberIDSetEvent(self.request, theuser.jid)
                 unset_event = events.JabberIDUnsetEvent(self.request, previous_jid)
@@ -330,7 +330,7 @@
 
         # subscription for page change notification
         theuser.subscribed_pages = self._decode_pagelist('subscribed_pages')
-        
+
         # subscription to various events
         available = events.get_subscribable_events()
         theuser.subscribed_events = [ev for ev in form.get('events', [])]
@@ -470,14 +470,14 @@
             options.append((theme, theme))
 
         return util.web.makeSelection('theme_name', options, cur_theme)
-    
+
     def _event_select(self):
         """ Create event subscription list. """
-        
+
         event_list = events.get_subscribable_events()
         selected = self.request.user.subscribed_events
         super = self.request.user.isSuperUser()
-        
+
         # Create a list of (value, name) tuples for display in <select>
         # Only include super-user visible events if current user has these rights.
         # It's cosmetic - the check for super-user rights should be performed
@@ -486,7 +486,7 @@
         for key in event_list.keys():
             if not event_list[key]['superuser'] or super:
                 allowed.append((key, event_list[key]['desc']))
-        
+
         return util.web.makeMultiSelection('events', allowed, selectedvals=selected)
 
     def _editor_default_select(self):
@@ -621,7 +621,7 @@
                 html.TEXTAREA(name="quicklinks", rows="6", cols="50")
                     .append('\n'.join(self.request.user.getQuickLinks())),
             ], valign="top")
-            
+
             # FIXME: this depends on Jabber ATM, but may not do so in the future
             if self.cfg.jabber_enabled:
                 self.make_row(_('Subscribed events'), [self._event_select()])
@@ -667,7 +667,7 @@
 
         if self.cfg.mail_enabled:
             buttons.append(("account_sendmail", _('Mail me my account data')))
-            
+
         if self.cfg.jabber_enabled:
             buttons.append(("account_sendjabber", _('Send me my account data with Jabber')))
 
@@ -808,14 +808,14 @@
              request.formatter.url(0)),
             # 3
             (request.page.link_to(request, text=_('Mail me my account data'),
-                                 querystr={"action":"userform",
+                                 querystr={"action": "userform",
                                            "email": account.email,
                                            "account_sendmail": "1",
                                            "sysadm": "users", },
                                  rel='nofollow')
             + " " +
             request.page.link_to(request, text=_('Send me my account data with Jabber'),
-                                 querystr={"action":"userform",
+                                 querystr={"action": "userform",
                                            "jid": account.jid,
                                            "account_sendjabber": "1",
                                            "sysadm": "users", },
--- a/MoinMoin/util/_tests/test_lock.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/util/_tests/test_lock.py	Mon Jul 02 23:33:20 2007 +0200
@@ -28,7 +28,7 @@
 
     def testBrokenTimeAPI(self):
         """ util.lock: os.stat().mtime consistency with time.time()
-        
+
             the timestamp os.stat reports as st_mtime on a fresh file should
             be the same (or at least almost the same) as the time time.time()
             reported at this time.
@@ -53,8 +53,8 @@
         self.failUnless(lock.acquire(0.1), "Could not acquire lock")
 
     def testRelease(self):
-        """ util.lock: ExclusiveLock: release 
-        
+        """ util.lock: ExclusiveLock: release
+
         After releasing a lock, new one could be acquired.
         """
         lock = ExclusiveLock(self.lock_dir)
@@ -110,7 +110,7 @@
 
     def testAcquireAfterTimeout(self):
         """ util.lock: ExclusiveLock: acquire after timeout
-        
+
         Lock with one lock, try to acquire another after timeout.
         """
         timeout = 2.0 # minimal timout
--- a/MoinMoin/util/_tests/test_pysupport.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/util/_tests/test_pysupport.py	Mon Jul 02 23:33:20 2007 +0200
@@ -80,7 +80,7 @@
 
     def testExisting(self):
         """ pysupport: import existing wiki plugin
-        
+
         Tests if a module can be imported from an arbitrary path
         like it is done in moin for plugins. Some strange bug
         in the old implementation failed on an import of os,
--- a/MoinMoin/util/bdiff.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/util/bdiff.py	Mon Jul 02 23:33:20 2007 +0200
@@ -3,9 +3,9 @@
 
     @copyright: 2005 Matt Mackall <mpm@selenic.com>,
                 2006 MoinMoin:AlexanderSchremmer
-    
+
     Algorithm taken from mercurial's mdiff.py
-    
+
     @license: GNU GPL, see COPYING for details.
 """
 
--- a/MoinMoin/util/chartypes_create.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/util/chartypes_create.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,7 +1,7 @@
 """
     Build MoinMoin/util/chartypes.py with
     UCS-2 character types (upper/lower/digits/spaces).
-    
+
     @copyright: 2004 MoinMoin:ThomasWaldmann
     @license: GNU GPL, see COPYING for details
 """
--- a/MoinMoin/util/dataset.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/util/dataset.py	Mon Jul 02 23:33:20 2007 +0200
@@ -25,7 +25,7 @@
         """ Init a column
 
         keys in kw that not in slots are ignored.
-        
+
         @param name: column name, unicode or ascii
         @param kw: column meta data, unicode or ascii
         """
@@ -36,11 +36,11 @@
 
 class Dataset:
     """ Base dataset.
-    
+
     Holds a 2-dimensional data set (m rows of n columns) and associated
     meta-data (column titles, etc.).
 
-    Note: Dataset rows and column must contain only ascii or Unicode values!  
+    Note: Dataset rows and column must contain only ascii or Unicode values!
     """
 
     def __init__(self, data_id=None):
--- a/MoinMoin/util/diff3.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/util/diff3.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,7 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 """
     MoinMoin - diff3 algorithm
-    
+
     @copyright: 2002 Florian Festi
     @license: GNU GPL, see COPYING for details.
 """
@@ -18,7 +18,7 @@
 
 def merge(old, other, new, allow_conflicts=1, *markers):
     """ do line by line diff3 merge
-        input must be lists containing single lines   
+        input must be lists containing single lines
     """
     if not markers:
         markers = default_markers
@@ -156,7 +156,7 @@
 
 def match(list1, list2, nr1, nr2, maxcount=3):
     """ return the number matching items after the given positions
-        maximum maxcount lines are are processed 
+        maximum maxcount lines are are processed
     """
     i = 0
     len1 = len(list1)
--- a/MoinMoin/util/diff_html.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/util/diff_html.py	Mon Jul 02 23:33:20 2007 +0200
@@ -56,7 +56,7 @@
 </span>
 </td>
 </tr>
-""" % (_('Deletions are marked like this.'), _('Additions are marked like this.'),)
+""" % (_('Deletions are marked like this.'), _('Additions are marked like this.'), )
 
     # Print all differences
     for match in linematch:
--- a/MoinMoin/util/diff_text.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/util/diff_text.py	Mon Jul 02 23:33:20 2007 +0200
@@ -10,7 +10,7 @@
 def diff(oldlines, newlines, **kw):
     """
     Find changes between oldlines and newlines.
-    
+
     @param oldlines: list of old text lines
     @param newlines: list of new text lines
     @keyword ignorews: if 1: ignore whitespace
--- a/MoinMoin/util/filesys.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/util/filesys.py	Mon Jul 02 23:33:20 2007 +0200
@@ -126,7 +126,7 @@
         HFS and HFS+ file systems, are case preserving but case
         insensitive. You can't have 'file' and 'File' in the same
         directory, but you can get the real name of 'file'.
-        
+
         @param path: string
         @rtype: string
         @return the real case of path or None
@@ -155,7 +155,7 @@
         return os.listdir(path)
     else:
         return dircache.listdir(path)
-        
+
 def dcreset():
     if sys.platform == 'win32' or not DCENABLED:
         return
--- a/MoinMoin/util/lock.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/util/lock.py	Mon Jul 02 23:33:20 2007 +0200
@@ -11,7 +11,7 @@
 
 class Timer:
     """ Simple count down timer
-    
+
     Useful for code that needs to complete a task within some timeout.
     """
     defaultSleep = 0.25
@@ -58,7 +58,7 @@
 
 class ExclusiveLock:
     """ Exclusive lock
-    
+
     Uses a directory as portable lock method. On all platforms,
     creating a directory will fail if the directory exists.
 
@@ -73,7 +73,7 @@
 
     def __init__(self, dir, timeout=None):
         """ Init a write lock
-        
+
         @param dir: the lock directory. Since this lock uses a empty
             filename, the dir is the lockDir.
         @param timeout: while trying to acquire, the lock will expire
@@ -93,8 +93,8 @@
         self._locked = False
 
     def acquire(self, timeout=None):
-        """ Try to acquire a lock. 
-        
+        """ Try to acquire a lock.
+
         Try to create the lock directory. If it fails because another
         lock exists, try to expire the other lock. Repeat after little
         sleep until timeout passed.
@@ -132,8 +132,8 @@
         return os.path.exists(self.lockDir)
 
     def isExpired(self):
-        """ Return True if too old or missing; False otherwise 
-        
+        """ Return True if too old or missing; False otherwise
+
         TODO: Since stat returns times using whole seconds, this is
         quite broken. Maybe use OS specific calls like Carbon.File on
         Mac OS X?
@@ -179,10 +179,10 @@
 
 class WriteLock(ExclusiveLock):
     """ Exclusive Read/Write Lock
-    
+
     When a resource is locked with this lock, clients can't read
     or write the resource.
-    
+
     This super-exclusive lock can't be acquired if there are any other
     locks, either WriteLock or ReadLocks. When trying to acquire, this
     lock will try to expire all existing ReadLocks.
@@ -191,7 +191,7 @@
 
     def __init__(self, dir, timeout=None, readlocktimeout=None):
         """ Init a write lock
-        
+
         @param dir: the lock directory. Every resource should have one
             lock directory, which may contain read or write locks.
         @param timeout: while trying to acquire, the lock will expire
@@ -207,12 +207,12 @@
 
     def acquire(self, timeout=None):
         """ Acquire an exclusive write lock
-        
+
         Try to acquire an exclusive lock, then try to expire existing
         read locks. If timeout has not passed, the lock is acquired.
         Otherwise, the exclusive lock is released and the lock is not
         acquired.
-        
+
         Return True if lock acquired, False otherwise.
         """
         if self._locked:
@@ -257,18 +257,18 @@
 
 class ReadLock(ExclusiveLock):
     """ Read lock
-    
+
     The purpose of this lock is to mark the resource as read only.
     Multiple ReadLocks can be acquired for same resource, but no
     WriteLock can be acquired until all ReadLocks are released.
-    
+
     Allows only one lock per instance.
     """
     fileName = 'read_lock_'
 
     def __init__(self, dir, timeout=None):
         """ Init a read lock
-        
+
         @param dir: the lock directory. Every resource should have one
             lock directory, which may contain read or write locks.
         @param timeout: while trying to acquire, the lock will expire
@@ -280,10 +280,10 @@
 
     def acquire(self, timeout=None):
         """ Try to acquire a 'read' lock
-        
+
         To prevent race conditions, acquire first an exclusive lock,
         then acquire a read lock. Finally release the exclusive lock so
-        other can have read lock, too. 
+        other can have read lock, too.
         """
         if self._locked:
             raise RuntimeError("lock already locked")
@@ -300,7 +300,7 @@
 
 class LazyReadLock(ReadLock):
     """ Lazy Read lock
-    
+
     See ReadLock, but we do an optimization here:
     If (and ONLY if) the resource protected by this lock is updated in a POSIX
     style "write new content to tmpfile, rename tmpfile -> origfile", then reading
@@ -354,7 +354,7 @@
 
 class LazyWriteLock(WriteLock):
     """ Lazy Write lock
-    
+
     See WriteLock and LazyReadLock docs.
     """
     def __init__(self, dir, timeout=None):
--- a/MoinMoin/util/profile.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/util/profile.py	Mon Jul 02 23:33:20 2007 +0200
@@ -6,7 +6,7 @@
 Typical usage:
 
  1. Create a profiler:
-    
+
     from MoinMoin.util.profile import Profiler
     profiler = Profiler('my log')
 
@@ -26,7 +26,7 @@
    lower for more accurate results.
 
  * collect (default 0):
-    
+
    Use gc.collect to force a memory cleanup each sample. Keeps the
    memory usage much lower, but your profile data will not reflect the
    real world memory usage of the application.
@@ -51,7 +51,7 @@
     """
     def __init__(self, name, requestsPerSample=100, collect=0):
         """ Initialize a profiler
-        
+
         @param name: profiler name, used in the log file name
         @param requestsPerSample: how many request to run between samples
         @param collect: should call gc.collect() in each sample
@@ -87,9 +87,9 @@
 
         You can call this to make samples between the samples done each
         requestsPerSample, for example, at startup.
-        
+
         Invoke common methods for all profilers. Some profilers like
-        TwistedProfiler override this method. 
+        TwistedProfiler override this method.
         """
         self._setData()
         self._setMemory()
@@ -114,7 +114,7 @@
         """ Get process memory usage
 
         Private method used by profilers.
-        
+
         Uses ps call, maybe we should use procfs on Linux or maybe
         getrusage system call (using the ctypes module).
         """
@@ -151,7 +151,7 @@
 
     def sample(self):
         """ Make a sample of memory usage and log it
-        
+
         On twisted we can't just call ps - we have to use deferred,
         which will call us using a callback when its finished, and then
         we log.
--- a/MoinMoin/util/pysupport.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/util/pysupport.py	Mon Jul 02 23:33:20 2007 +0200
@@ -56,7 +56,7 @@
     names only in runtime.
 
     Any error raised here must be handled by the caller.
-    
+
     @param modulename: full qualified mudule name, e.g. x.y.z
     @param name: name to import from modulename
     @rtype: any object
--- a/MoinMoin/util/rpc_aggregator.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/util/rpc_aggregator.py	Mon Jul 02 23:33:20 2007 +0200
@@ -1,7 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 """
     MoinMoin - RPC Aggregator
-    
+
     Aggregates RPC calls into MultiCall batches in order to increase
     the speed.
 
--- a/MoinMoin/util/thread_monitor.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/util/thread_monitor.py	Mon Jul 02 23:33:20 2007 +0200
@@ -50,7 +50,7 @@
     dumped = set()
     to_dump = set()
     hook_enabled = False
-    
+
     def dump(cls, label):
         df = cls.dump_file or sys.stderr
         s = StringIO()
@@ -80,7 +80,7 @@
             cls.dump_file = dumpfile
         cls.dumping = True
     trigger_dump = classmethod(trigger_dump)
-    
+
     def activate_hook(cls):
         sys.setprofile(cls.dump_hook)
         threading.setprofile(cls.dump_hook)
--- a/MoinMoin/util/web.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/util/web.py	Mon Jul 02 23:33:20 2007 +0200
@@ -46,10 +46,10 @@
 
 def makeMultiSelection(name, values, selectedvals=None, size=5):
     """Make a HTML multiple <select> element with named `name` from a value list.
-    
+
     The list can either be a list of strings, or a list of (value, label) tuples.
     `selectedvals` is a list of values that should be pre-selected.
-    
+
     """
     from MoinMoin.widget import html
     result = html.SELECT(name=name, size="%d" % int(size), multiple=True)
@@ -60,13 +60,13 @@
             value=val[0], selected=(val[0] in selectedvals))
             .append(html.Text(val[1]))
         )
-    
+
     return result
 
 class Color:
     """ RGB-Triple that automatically converts from and to
         "#RRGGBB" encoding, and also takes Netscape color names.
-        
+
         The color values are stored in the attributes `r`, `g` and `b`.
 
         Example:
@@ -226,7 +226,7 @@
 
     def __init__(self, color):
         """ Init color value, the 'color' parameter may be
-            another Color instance, a tuple containing 3 color values, 
+            another Color instance, a tuple containing 3 color values,
             a Netscape color name or a HTML color ("#RRGGBB").
         """
         if isinstance(color, tuple) and len(color) == 3:
--- a/MoinMoin/widget/_tests/test_html.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/widget/_tests/test_html.py	Mon Jul 02 23:33:20 2007 +0200
@@ -18,7 +18,7 @@
         TO DO: add tests for all elements by HTML 4 spec.
         """
         tests = (
-            # description, call, expected           
+            # description, call, expected
             ('Create text', html.Text('<br> &'), '&lt;br&gt; &amp;'),
             ('Create raw html', html.Raw('<br> &amp;'), '<br> &amp;'),
             ('Create br', html.BR(), '<br>'),
--- a/MoinMoin/widget/dialog.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/widget/dialog.py	Mon Jul 02 23:33:20 2007 +0200
@@ -18,8 +18,8 @@
     """
 
     def __init__(self, request, **kw):
-        """ Initialize a dialog 
-        
+        """ Initialize a dialog
+
         @param request: current request
         @keyword content: dialong content
         """
@@ -32,7 +32,7 @@
 
 class Status(base.Widget):
     """ Status widget
-    
+
     Use Status when you want to present to the user status information,
     and no interaction needed.
 
@@ -43,8 +43,8 @@
     """
 
     def __init__(self, request, **kw):
-        """ Initialize a dialog 
-        
+        """ Initialize a dialog
+
         @param request: current request
         @keyword content: status message content
         """
--- a/MoinMoin/wikidicts.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/wikidicts.py	Mon Jul 02 23:33:20 2007 +0200
@@ -59,7 +59,7 @@
         key2:: value2 containing spaces
         ...
         keyn:: ....
-       any text ignored      
+       any text ignored
     """
     # Key:: Value - ignore all but key:: value pairs, strip whitespace
     regex = r'^ (?P<key>.+?):: (?P<val>.*?) *$'
--- a/MoinMoin/wikiutil.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/wikiutil.py	Mon Jul 02 23:33:20 2007 +0200
@@ -37,7 +37,7 @@
     """ Decode Windows path names correctly. This is needed because many CGI
     servers follow the RFC recommendation and re-encode the path_info variable
     according to the file system semantics.
-    
+
     @param text: the text to decode, string
     @rtype: unicode
     @return: decoded text
@@ -86,7 +86,7 @@
 def decodeUserInput(s, charsets=[config.charset]):
     """
     Decodes input from the user.
-    
+
     @param s: the string to unquote
     @param charsets: list of charsets to assume the string is in
     @rtype: unicode
@@ -106,7 +106,7 @@
 def url_quote(s, safe='/', want_unicode=False):
     """
     Wrapper around urllib.quote doing the encoding/decoding as usually wanted:
-    
+
     @param s: the string to quote (can be str or unicode, if it is unicode,
               config.charset is used to encode it before calling urllib)
     @param safe: just passed through to urllib
@@ -126,7 +126,7 @@
 def url_quote_plus(s, safe='/', want_unicode=False):
     """
     Wrapper around urllib.quote_plus doing the encoding/decoding as usually wanted:
-    
+
     @param s: the string to quote (can be str or unicode, if it is unicode,
               config.charset is used to encode it before calling urllib)
     @param safe: just passed through to urllib
@@ -146,7 +146,7 @@
 def url_unquote(s, want_unicode=True):
     """
     Wrapper around urllib.unquote doing the encoding/decoding as usually wanted:
-    
+
     @param s: the string to unquote (can be str or unicode, if it is unicode,
               config.charset is used to encode it before calling urllib)
     @param want_unicode: for the less usual case that you want to get back
@@ -180,7 +180,7 @@
 
 def makeQueryString(qstr=None, want_unicode=False, **kw):
     """ Make a querystring from arguments.
-        
+
     kw arguments overide values in qstr.
 
     If a string is passed in, it's returned verbatim and
@@ -203,7 +203,7 @@
 def quoteWikinameURL(pagename, charset=config.charset):
     """ Return a url encoding of filename in plain ascii
 
-    Use urllib.quote to quote any character that is not always safe. 
+    Use urllib.quote to quote any character that is not always safe.
 
     @param pagename: the original pagename (unicode)
     @param charset: url text encoding, 'utf-8' recommended. Other charset
@@ -218,11 +218,11 @@
 
 def escape(s, quote=0):
     """ Escape possible html tags
-    
+
     Replace special characters '&', '<' and '>' by SGML entities.
     (taken from cgi.escape so we don't have to include that, even if we
     don't use cgi at all)
-    
+
     @param s: (unicode) string to escape
     @param quote: bool, should transform '\"' to '&quot;'
     @rtype: when called with a unicode object, return unicode object - otherwise return string object
@@ -283,11 +283,11 @@
 
 def quoteWikinameFS(wikiname, charset=config.charset):
     """ Return file system representation of a Unicode WikiName.
-            
+
     Warning: will raise UnicodeError if wikiname can not be encoded using
     charset. The default value of config.charset, 'utf-8' can encode any
     character.
-        
+
     @param wikiname: Unicode string possibly containing non-ascii characters
     @param charset: charset to encode string
     @rtype: string
@@ -301,7 +301,7 @@
         # append leading safe stuff
         quoted.append(filename[location:needle.start()])
         location = needle.end()
-        # Quote and append unsafe stuff           
+        # Quote and append unsafe stuff
         quoted.append('(')
         for character in needle.group():
             quoted.append('%02x' % ord(character))
@@ -314,17 +314,17 @@
 
 def unquoteWikiname(filename, charsets=[config.charset]):
     """ Return Unicode WikiName from quoted file name.
-    
+
     We raise an InvalidFileNameError if we find an invalid name, so the
     wiki could alarm the admin or suggest the user to rename a page.
     Invalid file names should never happen in normal use, but are rather
-    cheap to find. 
-    
+    cheap to find.
+
     This function should be used only to unquote file names, not page
     names we receive from the user. These are handled in request by
     urllib.unquote, decodePagename and normalizePagename.
-    
-    Todo: search clients of unquoteWikiname and check for exceptions. 
+
+    Todo: search clients of unquoteWikiname and check for exceptions.
 
     @param filename: string using charset and possibly quoted parts
     @param charsets: list of charsets used by string
@@ -378,7 +378,7 @@
     """ Convert UNIX timestamp (may be float or int) to our version
         (long) int.
         We don't want to use floats, so we just scale by 1e6 to get
-        an integer in usecs. 
+        an integer in usecs.
     """
     return long(ts*1000000L) # has to be long for py 2.2.x
 
@@ -589,7 +589,7 @@
 
 def split_wiki(wikiurl):
     """ Split a wiki url, e.g:
-    
+
     'MoinMoin:FrontPage' -> "MoinMoin", "FrontPage", ""
     'FrontPage' -> "Self", "FrontPage", ""
     'MoinMoin:"Page with blanks" link title' -> "MoinMoin", "Page with blanks", "link title"
@@ -626,7 +626,7 @@
 
 def resolve_wiki(request, wikiurl):
     """ Resolve an interwiki link.
-    
+
     @param request: the request object
     @param wikiurl: the InterWiki:PageName link
     @rtype: tuple
@@ -642,10 +642,10 @@
 def join_wiki(wikiurl, wikitail):
     """
     Add a (url_quoted) page name to an interwiki url.
-   
+
     Note: We can't know what kind of URL quoting a remote wiki expects.
           We just use a utf-8 encoded string with standard URL quoting.
-          
+
     @param wikiurl: wiki url, maybe including a $PAGE placeholder
     @param wikitail: page name
     @rtype: string
@@ -664,7 +664,7 @@
 
 def isSystemPage(request, pagename):
     """ Is this a system page? Uses AllSystemPagesGroup internally.
-    
+
     @param request: the request object
     @param pagename: the page name
     @rtype: bool
@@ -676,7 +676,7 @@
 
 def isTemplatePage(request, pagename):
     """ Is this a template page?
-    
+
     @param pagename: the page name
     @rtype: bool
     @return: true if page is a template page
@@ -699,11 +699,11 @@
 
     WARNING: DO NOT USE THIS TO FILTER THE FULL PAGE LIST! Use
     getPageList with a filter function.
-        
+
     If you pass a list with a single pagename, either that is returned
     or an empty list, thus you can use this function like a `isCategoryPage`
     one.
-       
+
     @param pagelist: a list of pages
     @rtype: list
     @return: only the category pages of pagelist
@@ -714,7 +714,7 @@
 
 def getLocalizedPage(request, pagename): # was: getSysPage
     """ Get a system page according to user settings and available translations.
-    
+
     We include some special treatment for the case that <pagename> is the
     currently rendered page, as this is the case for some pages used very
     often, like FrontPage, RecentChanges etc. - in that case we reuse the
@@ -767,7 +767,7 @@
     those who have not created a homepage.
 
     DEPRECATED - try to use getInterwikiHomePage (see below)
-    
+
     @param request: the request object
     @param username: the user's name
     @rtype: Page
@@ -791,13 +791,13 @@
 def getInterwikiHomePage(request, username=None):
     """
     Get a user's homepage.
-    
+
     cfg.user_homewiki influences behaviour of this:
     'Self' does mean we store user homepage in THIS wiki.
     When set to our own interwikiname, it behaves like with 'Self'.
-    
+
     'SomeOtherWiki' means we store user homepages in another wiki.
-    
+
     @param request: the request object
     @param username: the user's name
     @rtype: tuple (or None for anon users)
@@ -1009,7 +1009,7 @@
 
 def importPlugin(cfg, kind, name, function="execute"):
     """ Import wiki or builtin plugin
-    
+
     Returns function from a plugin module name. If name can not be
     imported, raise PluginMissingError. If function is missing, raise
     PluginAttributeError.
@@ -1020,7 +1020,7 @@
     Wiki plugins will always override builtin plugins. If you want
     specific plugin, use either importWikiPlugin or importBuiltinPlugin
     directly.
-    
+
     @param cfg: wiki config instance
     @param kind: what kind of module we want to import
     @param name: the name of the module
@@ -1036,7 +1036,7 @@
 
 def importWikiPlugin(cfg, kind, name, function="execute"):
     """ Import plugin from the wiki data directory
-    
+
     See importPlugin docstring.
     """
     if not name in wikiPlugins(kind, cfg):
@@ -1046,8 +1046,8 @@
 
 
 def importBuiltinPlugin(kind, name, function="execute"):
-    """ Import builtin plugin from MoinMoin package 
-    
+    """ Import builtin plugin from MoinMoin package
+
     See importPlugin docstring.
     """
     if not name in builtinPlugins(kind):
@@ -1057,8 +1057,8 @@
 
 
 def importNameFromPlugin(moduleName, name):
-    """ Return name from plugin module 
-    
+    """ Return name from plugin module
+
     Raise PluginAttributeError if name does not exists.
     """
     module = __import__(moduleName, globals(), {}, [name])
@@ -1070,7 +1070,7 @@
 
 def builtinPlugins(kind):
     """ Gets a list of modules in MoinMoin.'kind'
-    
+
     @param kind: what kind of modules we look for
     @rtype: list
     @return: module names
@@ -1081,10 +1081,10 @@
 
 def wikiPlugins(kind, cfg):
     """ Gets a list of modules in data/plugin/'kind'
- 
+
     Require valid plugin directory. e.g missing 'parser' directory or
     missing '__init__.py' file will raise errors.
-    
+
     @param kind: what kind of modules we look for
     @rtype: list
     @return: module names
@@ -1096,7 +1096,7 @@
 
 def getPlugins(kind, cfg):
     """ Gets a list of plugin names of kind
-    
+
     @param kind: what kind of modules we look for
     @rtype: list
     @return: module names
@@ -1180,7 +1180,7 @@
     a tuple (found_flag, msg). found_flag is whether it did find and process
     something, msg is '' when all was OK or any other string to return an error
     message.
-    
+
     @param request: the request object
     @param attrstring: string containing the attributes to be parsed
     @param endtoken: token terminating parsing
@@ -1265,28 +1265,28 @@
          String   | s      | 'Stri\'ng'
          Boolean  | b      | 0 1 True false
          Name     |        | case_sensitive | converted to string
-        
-        So say you want to parse three things, name, age and if the 
+
+        So say you want to parse three things, name, age and if the
         person is male or not:
-        
+
         The pattern will be: %(name)s%(age)i%(male)b
-        
+
         As a result, the returned dict will put the first value into
         male, second into age etc. If some argument is missing, it will
-        get None as its value. This also means that all the identifiers 
+        get None as its value. This also means that all the identifiers
         in the pattern will exist in the dict, they will just have the
         value None if they were not specified by the caller.
-        
+
         So if we call it with the parameters as follows:
             ("John Smith", 18)
         this will result in the following dict:
             {"name": "John Smith", "age": 18, "male": None}
-        
+
         Another way of calling would be:
             ("John Smith", male=True)
         this will result in the following dict:
             {"name": "John Smith", "age": None, "male": True}
-        
+
         @copyright: 2004 by Florian Festi,
                     2006 by Mikko Virkkilä
         @license: GNU GPL, see COPYING for details.
@@ -1348,7 +1348,7 @@
 
         if not params:
             params = '""'
-        
+
         while start < len(params):
             match = re.match(self.param_re, params[start:])
             if not match:
@@ -1372,7 +1372,7 @@
                 type = 'n'
             else:
                 value = None
-            
+
             parameter_list.append(value)
             if match.group("name"):
                 if match.group("name") not in self.param_dict:
@@ -1402,7 +1402,7 @@
             i += 1
 
         return parameter_list, parameter_dict
-    
+
 """ never used:
     def _check_type(value, type, format):
         if type == 'n' and 's' in format: # n as s
@@ -1433,7 +1433,7 @@
     param = ' 4,"DI\'NG", b=retry, a="DING"'
 
     #p_list, p_dict = parse_parameters(param)
-    
+
     print 'Pattern :', pattern
     print 'Param :', param
 
@@ -1453,7 +1453,7 @@
     """
     Make a filename that is supposed to be a plain name secure, i.e.
     remove any possible path components that compromise our system.
-    
+
     @param basename: (possibly unsafe) filename
     @rtype: string
     @return: (safer) filename
@@ -1467,7 +1467,7 @@
 def mapURL(request, url):
     """
     Map URLs according to 'cfg.url_mappings'.
-    
+
     @param url: a URL
     @rtype: string
     @return: mapped URL
@@ -1488,7 +1488,7 @@
     """
     Return a group letter for `name`, which must be a unicode string.
     Currently supported: Hangul Syllables (U+AC00 - U+D7AF)
-    
+
     @param name: a string
     @rtype: string
     @return: group letter or None
@@ -1500,10 +1500,10 @@
         return c.upper() # we put lower and upper case words into the same index group
 
 
-def isStrictWikiname(name, word_re=re.compile(ur"^(?:[%(u)s][%(l)s]+){2,}$" % {'u':config.chars_upper, 'l':config.chars_lower})):
+def isStrictWikiname(name, word_re=re.compile(ur"^(?:[%(u)s][%(l)s]+){2,}$" % {'u': config.chars_upper, 'l': config.chars_lower})):
     """
     Check whether this is NOT an extended name.
-    
+
     @param name: the wikiname in question
     @rtype: bool
     @return: true if name matches the word_re
@@ -1514,7 +1514,7 @@
 def isPicture(url):
     """
     Is this a picture's url?
-    
+
     @param url: the url in question
     @rtype: bool
     @return: true if url points to a picture
@@ -1668,10 +1668,10 @@
 
 def get_processing_instructions(body):
     """ Extract the processing instructions / acl / etc. at the beginning of a page's body.
-    
+
         Hint: if you have a Page object p, you already have the result of this function in
               p.meta and (even better) parsed/processed stuff in p.pi.
-    
+
         Returns a list of (pi, restofline) tuples and a string with the rest of the body.
     """
     pi = []
--- a/MoinMoin/wikixml/marshal.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/wikixml/marshal.py	Mon Jul 02 23:33:20 2007 +0200
@@ -15,7 +15,7 @@
         ITEM_CONTAINER (default "item") can be overwritten by derived
         classes; if ROOT_CONTAINER is `None`, the usually generated
         container element is omitted, the same is true for ITEM_CONTAINER.
-        
+
         PRIVATE_PREFIXES is a list of prefixes of tagnames that are
         treated as private, i.e. things that should not be serialized.
         Default is to omit all properties starting with an underscore.
@@ -41,7 +41,7 @@
 
     def __toXML(self, element, data):
         """ Recursive helper method that transforms an object to XML.
-        
+
             Returns a list of strings, which constitute the XML document.
         """
         # map tag names
--- a/MoinMoin/xmlrpc/__init__.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/xmlrpc/__init__.py	Mon Jul 02 23:33:20 2007 +0200
@@ -4,7 +4,7 @@
 
     If you want to use wikirpc function "putPage", read the comments in
     xmlrpc_putPage or it won't work!
-    
+
     Parts of this code are based on Juergen Hermann's wikirpc.py,
     Les Orchard's "xmlrpc.cgi" and further work by Gustavo Niemeyer.
 
@@ -53,12 +53,12 @@
         self.cfg = request.cfg
 
     #############################################################################
-    ### Helper functions           
+    ### Helper functions
     #############################################################################
 
     def _instr(self, text):
         """ Convert inbound string.
-        
+
         @param text: the text to convert (encoded str or unicode)
         @rtype: unicode
         @return: text as unicode
@@ -76,7 +76,7 @@
 
     def _inlob(self, text):
         """ Convert inbound base64-encoded utf-8 to Large OBject.
-        
+
         @param text: the text to convert
         @rtype: unicode
         @return: text
@@ -87,7 +87,7 @@
 
     def _outlob(self, text):
         """ Convert outbound Large OBject to base64-encoded utf-8.
-        
+
         @param text: the text, either unicode or utf-8 string
         @rtype: str
         @return: xmlrpc Binary object
@@ -101,7 +101,7 @@
 
     def _dump_exc(self):
         """ Convert an exception to a string.
-        
+
         @rtype: str
         @return: traceback as string
         """
@@ -133,7 +133,7 @@
                 response = xmlrpclib.dumps(response)
             else:
                 # wrap response in a singleton tuple
-                response = (response,)
+                response = (response, )
 
                 # serialize it
                 response = xmlrpclib.dumps(response, methodresponse=1)
@@ -202,7 +202,7 @@
                 # XXX A marshalling error in any response will fail the entire
                 # multicall. If someone cares they should fix this.
                 result = self.dispatch(method_name, params)
-                
+
                 if not isinstance(result, xmlrpclib.Fault):
                     results.append([result])
                 else:
@@ -215,7 +215,7 @@
                     {'faultCode': 1,
                      'faultString': "%s:%s" % (sys.exc_type, sys.exc_value)}
                     )
-                
+
         return results
 
     #############################################################################
@@ -356,7 +356,7 @@
 
     def xmlrpc_getPageInfoVersion(self, pagename, rev):
         """ Return page information for specific revision
-        
+
         @param pagename: the name of the page (utf-8)
         @param rev: revision to get info about (int)
         @rtype: dict
@@ -414,7 +414,7 @@
 
     def xmlrpc_getPageVersion(self, pagename, rev):
         """ Get raw text from specific revision of pagename
-        
+
         @param pagename: pagename (utf-8)
         @param rev: revision number (int)
         @rtype: str
@@ -447,7 +447,7 @@
 
     def xmlrpc_getPageHTMLVersion(self, pagename, rev):
         """ Get HTML of from specific revision of pagename
-        
+
         @param pagename: the page name (utf-8)
         @param rev: revision number (int)
         @rtype: str
@@ -529,7 +529,7 @@
         # and make very very sure that nobody untrusted can access your wiki
         # via network or somebody will raid your wiki some day!
 
-        if (self.request.cfg.xmlrpc_putpage_trusted_only and 
+        if (self.request.cfg.xmlrpc_putpage_trusted_only and
             not self.request.user.auth_method in self.request.cfg.trusted_auth_methods):
             return xmlrpclib.Fault(1, "You are not allowed to edit this page")
 
@@ -605,7 +605,7 @@
                     centry.remove()
             except caching.CacheError:
                 pass
-            
+
     def _generate_auth_token(self):
         token = random_string(32, 'abcdefghijklmnopqrstuvwxyz0123456789')
         centry = caching.CacheEntry(self.request, 'xmlrpc-session', token,
@@ -623,35 +623,35 @@
 
         u = self.request.handle_auth(None, username=username,
                                      password=password, login=True)
-        
+
         if u and u.valid:
             return _generate_auth_token()
         else:
             return ""
-        
+
     def xmlrpc_getJabberAuthToken(self, jid, secret):
         """Returns a token which can be used for authentication.
-        
+
         This token can be used in other XMLRPC calls. Generation of
         token depends on user's JID and a secret shared between wiki
         and Jabber bot.
-        
+
         @param jid: a bare Jabber ID
-        
+
         """
-        
+
         if self.cfg.secret != secret:
             return ""
-        
+
         if randint(0, 99) == 0:
             _cleanup_stale_tokens(self.request)
-            
+
         u = self.request.handle_jid_auth(jid)
-        
+
         if u and u.valid:
             return _generate_auth_token()
         else:
-            return ""            
+            return ""
 
     def xmlrpc_applyAuthToken(self, auth_token):
         """ Applies the auth token and thereby authenticates the user. """
@@ -881,7 +881,7 @@
     def xmlrpc_listAttachments(self, pagename):
         """ Get all attachments associated with pagename
         Deprecated.
-        
+
         @param pagename: pagename (utf-8)
         @rtype: list
         @return: a list of utf-8 attachment names
@@ -896,7 +896,7 @@
 
     def xmlrpc_getAttachment(self, pagename, attachname):
         """ Get attachname associated with pagename
-        
+
         @param pagename: pagename (utf-8)
         @param attachname: attachment name (utf-8)
         @rtype base64
@@ -915,7 +915,7 @@
 
     def xmlrpc_putAttachment(self, pagename, attachname, data):
         """ Set attachname associated with pagename to data
-        
+
         @param pagename: pagename (utf-8)
         @param attachname: attachment name (utf-8)
         @param data: file data (base64)
@@ -929,7 +929,7 @@
 
         if not self.request.cfg.xmlrpc_putpage_enabled:
             return xmlrpclib.Boolean(0)
-        if (self.request.cfg.xmlrpc_putpage_trusted_only and 
+        if (self.request.cfg.xmlrpc_putpage_trusted_only and
             not self.request.user.auth_method in self.request.cfg.trusted_auth_methods):
             return xmlrpclib.Fault(1, "You are not allowed to edit this page")
         # also check ACLs
--- a/MoinMoin/xmlrpc/_tests/test_multicall.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/xmlrpc/_tests/test_multicall.py	Mon Jul 02 23:33:20 2007 +0200
@@ -16,12 +16,12 @@
 def test_fault_serialization():
     xmlrpc = XmlRpcBase(Request())
     xmlrpc.xmlrpc_return_fault = xmlrpc_return_fault
-    args = [{'methodName': 'return_fault', 'params': [ ]}]
-    
+    args = [{'methodName': 'return_fault', 'params': []}]
+
     print """If a XML RPC method returns a Fault, we should get a failure response
     instead of a serialized Fault, as it happened in the past. See revision
     8b7d6d70fc95 for details"""
-    
+
     result = xmlrpc.xmlrpc_system_multicall(args)
     assert(type(result[0]) == dict)
     assert(result[0].has_key("faultCode") and result[0].has_key("faultString"))
--- a/MoinMoin/xmlrpc/putClientInfo.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/xmlrpc/putClientInfo.py	Mon Jul 02 23:33:20 2007 +0200
@@ -5,7 +5,7 @@
     some statistics about MoinMoin usage.
 
     @copyright: 2004 MoinMoin:ThomasWaldmann
-    @license: GNU GPL, see COPYING for details.    
+    @license: GNU GPL, see COPYING for details.
 """
 
 import os, time
--- a/contrib/auth_externalcookie/wikiconfig.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/contrib/auth_externalcookie/wikiconfig.py	Mon Jul 02 23:33:20 2007 +0200
@@ -10,6 +10,7 @@
 
 class ExternalCookie(BaseAuth):
     name = 'external_cookie'
+
     def request(request, user_obj, **kw):
         """ authenticate via external cookie """
         import Cookie
@@ -50,9 +51,11 @@
 
             changed = False
             if aliasname != user.aliasname: # was the aliasname externally updated?
-                user.aliasname = aliasname ; changed = True # yes -> update user profile
+                user.aliasname = aliasname
+                changed = True # yes -> update user profile
             if email != user.email: # was the email addr externally updated?
-                user.email = email ; changed = True # yes -> update user profile
+                user.email = email
+                changed = True # yes -> update user profile
 
             if user:
                 user.create_or_update(changed)
--- a/contrib/gettext_parser/gettext.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/contrib/gettext_parser/gettext.py	Mon Jul 02 23:33:20 2007 +0200
@@ -16,10 +16,10 @@
 
     Of course, if you just attach the file, you won't be able to edit it in
     the wiki. So the #format method is better for online editing.
-    
+
     Requirements:
     =============
-    
+
     * requires Python 2.4 and installed "gettext" package (msgfmt)
     * requires wiki page content to be in config.charset, so do not put non-
       utf-8 content into a utf-8 wiki or it will crash.
@@ -35,16 +35,17 @@
 
 class Parser:
     extensions = ['.po']
-    def __init__ (self, raw, request, **kw):
+
+    def __init__(self, raw, request, **kw):
         self.raw = raw
         self.request = request
 
     def format(self, formatter):
         PIPE = subprocess.PIPE
         STDOUT = subprocess.STDOUT
-        p = subprocess.Popen(("msgfmt", "-c", "--statistics", "-",), shell=False,
+        p = subprocess.Popen(("msgfmt", "-c", "--statistics", "-", ), shell=False,
                              stdin=PIPE, stdout=PIPE, stderr=STDOUT)
-        
+
         charset = config.charset
         textin = self.raw.encode(charset)
         out = p.communicate(input=textin)[0]
@@ -73,3 +74,4 @@
                   ]
 
         self.request.write(''.join(textout))
+
--- a/contrib/phpwiki_migration/phpwiki2moinmoin.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/contrib/phpwiki_migration/phpwiki2moinmoin.py	Mon Jul 02 23:33:20 2007 +0200
@@ -61,15 +61,15 @@
 db = "wiki"
 user = "wiki"
 passwd = "wiki"
-# 
+#
 # This is a part of an SQL request (part of the WHERE, actually) that
 # allows you to select which pages get moved over
-# 
+#
 # do only those pages:
 pagename = ""
-# Example: 
+# Example:
 #pagename = "pagename='ParseTest' AND"
-# 
+#
 # the path to the moinmoin wiki, leave empty if you know what you're
 # doing
 wikipath = '/var/local/lib/wiki'
@@ -81,11 +81,11 @@
 # safe.
 editExistingPages = 0
 
-# 
+#
 # END OF CONFIGURATION DIRECTIVES
-# 
+#
 # XXX: the interactive way will be something like this:
-# 
+#
 # print "I will need the host/database/username/password of the phpwiki"
 # print "Host:",
 # host = raw_input()
@@ -97,7 +97,7 @@
 # passwd = getpass()
 # print "Pagename:"
 # pagename = raw_input()
-# 
+#
 # But right now this script DOES NOT COMPLETELY WORK, so it often has
 # to be ran and reran.
 
@@ -140,7 +140,7 @@
                                         result += [match.group(1)]
                                 result += ['}}}']
                                 if match.group(2) != '':
-                                        result += [lineparser(match.group(2),markup)]
+                                        result += [lineparser(match.group(2), markup)]
                                 pre = 0
                         else:
                                 # don't parse pre data
@@ -155,14 +155,14 @@
                                 # not what's after
                                 pre = match.group(2)
                                 if match.group(1) != '':
-                                        result += [lineparser(match.group(1),markup)]
+                                        result += [lineparser(match.group(1), markup)]
                                 result += ['{{{']
-                                if match.group(3) != '':        
+                                if match.group(3) != '':
                                         result += [match.group(3)]
 
                         else:
                                 # "common case": normal line parsing
-                                result += [lineparser(line,markup)]
+                                result += [lineparser(line, markup)]
 
         text = "\n".join(result)
         return text
@@ -175,33 +175,33 @@
 # markup is 1 (old style) or 2 (new style)
 def lineparser(text, markup):
         # headlines
-        p=re.compile('^!!!(.*)$',re.MULTILINE)
-        text = p.sub(r'= \1 =',text)
-        p=re.compile('^!!(.*)$',re.MULTILINE)
-        text = p.sub(r'== \1 ==',text)
-        p=re.compile('^!(.*)$',re.MULTILINE)
-        text = p.sub(r'=== \1 ===',text)
+        p = re.compile('^!!!(.*)$', re.MULTILINE)
+        text = p.sub(r'= \1 =', text)
+        p = re.compile('^!!(.*)$', re.MULTILINE)
+        text = p.sub(r'== \1 ==', text)
+        p = re.compile('^!(.*)$', re.MULTILINE)
+        text = p.sub(r'=== \1 ===', text)
 
         # pictures
-        p=re.compile('^\s*\[(http:.*(png|jpg|gif))\]',re.MULTILINE)
-        text = p.sub(r'\n\1',text)
+        p = re.compile('^\s*\[(http:.*(png|jpg|gif))\]', re.MULTILINE)
+        text = p.sub(r'\n\1', text)
 
         # links
         # the links like [http://]
-        p=re.compile('(?<!~)\[(http|https|ftp|nntp|news|mailto|telnet|file)(://.*?)\]',re.MULTILINE)
-        text = p.sub(r'\1\2',text)
-        
+        p = re.compile('(?<!~)\[(http|https|ftp|nntp|news|mailto|telnet|file)(://.*?)\]', re.MULTILINE)
+        text = p.sub(r'\1\2', text)
+
         # the [links like this]
-        p=re.compile('(?<!~|#)\[([^]\|]*)\]',re.MULTILINE)
-        text = p.sub(r'["\1"]',text)
+        p = re.compile('(?<!~|#)\[([^]\|]*)\]', re.MULTILINE)
+        text = p.sub(r'["\1"]', text)
 
         # links like [foo | http://...]
-        q=re.compile('(?<!~|#)\[([^]#]*?)\s*\|\s*([^]#\s]+?://[^]\s]+?)\]',re.MULTILINE)
-        text = q.sub(r'[\2 \1]',text)
+        q = re.compile('(?<!~|#)\[([^]#]*?)\s*\|\s*([^]#\s]+?://[^]\s]+?)\]', re.MULTILINE)
+        text = q.sub(r'[\2 \1]', text)
 
         # [fooo | bar]
-        p=re.compile('(?<!~|#)\[([^]]*?)\s*\|\s*([^]\s]+?)\]',re.MULTILINE)
-        text = p.sub(r'[:\2:\1]',text)
+        p = re.compile('(?<!~|#)\[([^]]*?)\s*\|\s*([^]\s]+?)\]', re.MULTILINE)
+        text = p.sub(r'[:\2:\1]', text)
 
         # XXX: the following constructs are broken. I don't know how
         # to express that in Moin
@@ -213,48 +213,48 @@
         # #[howdy|foo] => [[Anchor(foo)]]howdy
         #
         # rest should just go along
-        p=re.compile('#\[([^]|]*)\]', re.MULTILINE)
+        p = re.compile('#\[([^]|]*)\]', re.MULTILINE)
         text = p.sub(r'[[Anchor(\1)]]\1', text)
-        p=re.compile('#\[\|+([^]\|]*)\]', re.MULTILINE)
+        p = re.compile('#\[\|+([^]\|]*)\]', re.MULTILINE)
         text = p.sub(r'[[Anchor(\1)]]', text)
-        p=re.compile('#\[([^]\|]*)\|+([^]\|]*)\]', re.MULTILINE)
+        p = re.compile('#\[([^]\|]*)\|+([^]\|]*)\]', re.MULTILINE)
         text = p.sub(r'[[Anchor(\2)]]\1', text)
 
         # indented text
         # this might work for old style
         if markup == 1:
-                p=re.compile('^ (.*)$')
-                text = p.sub(r'{{{\n\1\n}}}',text)
+                p = re.compile('^ (.*)$')
+                text = p.sub(r'{{{\n\1\n}}}', text)
 
         # lists (regexp taken from phpwiki/lib/BlockParser.php:1.37)
-        p=re.compile('^\ {0,4}\
+        p = re.compile('^\ {0,4}\
                 (?: \+\
                   | -(?!-)\
                   | [o](?=\ )\
                   | [*] (?!(?=\S)[^*]*(?<=\S)[*](?:\\s|[-)}>"\'\\/:.,;!?_*=]) )\
-                )\ *(?=\S)',re.MULTILINE|re.VERBOSE)
-        text = p.sub(r' * ',text)
-        p=re.compile(' {0,4}(?:\\# (?!\[.*\])) *(?=\S)',re.MULTILINE)
-        text = p.sub(r' 1. ',text)
+                )\ *(?=\S)', re.MULTILINE|re.VERBOSE)
+        text = p.sub(r' * ', text)
+        p = re.compile(' {0,4}(?:\\# (?!\[.*\])) *(?=\S)', re.MULTILINE)
+        text = p.sub(r' 1. ', text)
 
         if markup == 1:
                 # bold (old style)
-                p=re.compile('__(\w*)',re.MULTILINE)
-                text = p.sub(r"'''\1",text)
-                p=re.compile('(\w*)__',re.MULTILINE)
-                text = p.sub(r"\1'''",text)
+                p = re.compile('__(\w*)', re.MULTILINE)
+                text = p.sub(r"'''\1", text)
+                p = re.compile('(\w*)__', re.MULTILINE)
+                text = p.sub(r"\1'''", text)
                 # emphasis is the same
         else:
                 # XXX: this doesn't do anything yet
-                # 
+                #
                 # translated from getStartRegexp() in
                 # phpwiki/lib/InlineParser.php:418
-                i = "_ (?! _)";
-                b = "\\* (?! \\*)";
-                tt = "= (?! =)";
+                i = "_ (?! _)"
+                b = "\\* (?! \\*)"
+                tt = "= (?! =)"
 
                 # any of the three.
-                any = "(?: " + i + "|" + b + "|" + tt + ")";
+                any = "(?: " + i + "|" + b + "|" + tt + ")"
 
                 # Any of [_*=] is okay if preceded by space or one of [-"'/:]
                 # _ or * is okay after = as long as not immediately followed by =
@@ -270,58 +270,58 @@
                         "(?<= < ) " + any + " (?! > )|" + \
                         "(?<= \\( ) " + any + " (?! \\) )" + \
                         ")"
-                
+
                 # Any of the above must be immediately followed by non-whitespace.
-                start_regexp = start + "(?= \S)";
-                
+                start_regexp = start + "(?= \S)"
+
 
         # PLUGINS
 
         # calendar plugin
-        p=re.compile('<\?plugin Calendar month=(\d*) year=(\d*)\?>',re.MULTILINE)
-        text = p.sub(r'[[MonthCalendar(,\2,\1)]]',text)
-        p=re.compile('<\?plugin Calendar\?>',re.MULTILINE)
-        text = p.sub(r'[[MonthCalendar]]',text)
+        p = re.compile('<\?plugin Calendar month=(\d*) year=(\d*)\?>', re.MULTILINE)
+        text = p.sub(r'[[MonthCalendar(,\2,\1)]]', text)
+        p = re.compile('<\?plugin Calendar\?>', re.MULTILINE)
+        text = p.sub(r'[[MonthCalendar]]', text)
 
         # BackLinks
-        p=re.compile('<\?plugin\s+BackLinks.*?\?>', re.MULTILINE)
-        text = p.sub(r"[[FullSearch()]]",text)
+        p = re.compile('<\?plugin\s+BackLinks.*?\?>', re.MULTILINE)
+        text = p.sub(r"[[FullSearch()]]", text)
 
         # FullSearch
-        p=re.compile('<\?plugin\s+FullTextSearch.*?(s=.*?)?\?>', re.MULTILINE)
-        text = p.sub(r'[[FullSearch()]]',text)
+        p = re.compile('<\?plugin\s+FullTextSearch.*?(s=.*?)?\?>', re.MULTILINE)
+        text = p.sub(r'[[FullSearch()]]', text)
 
         # RecentChanges
-        p=re.compile('<\?plugin\s+RecentChanges.*?\?>', re.MULTILINE)
-        text = p.sub(r'[[RecentChanges]]',text)
-        
+        p = re.compile('<\?plugin\s+RecentChanges.*?\?>', re.MULTILINE)
+        text = p.sub(r'[[RecentChanges]]', text)
+
         # tables (old style)
-        p=re.compile('^(\|.*)$',re.MULTILINE)
-        text = p.sub(r'\1|',text)
-        p=re.compile('\|',re.MULTILINE)
-        text = p.sub(r'||',text)
-        p=re.compile('\|\|<',re.MULTILINE)
-        text = p.sub(r'||<(>',text)
-        p=re.compile('\|\|>',re.MULTILINE)
-        text = p.sub(r'||<)>',text)
+        p = re.compile('^(\|.*)$', re.MULTILINE)
+        text = p.sub(r'\1|', text)
+        p = re.compile('\|', re.MULTILINE)
+        text = p.sub(r'||', text)
+        p = re.compile('\|\|<', re.MULTILINE)
+        text = p.sub(r'||<(>', text)
+        p = re.compile('\|\|>', re.MULTILINE)
+        text = p.sub(r'||<)>', text)
 
         if markup == 2:
                 # moinmoin tables are on one line
-                p=re.compile('\|\|\s*\n',re.MULTILINE)
-                text = p.sub(r'||',text)
-        
+                p = re.compile('\|\|\s*\n', re.MULTILINE)
+                text = p.sub(r'||', text)
+
         # mailto
-        p=re.compile('mailto:',re.MULTILINE)
-        text = p.sub(r'',text)
+        p = re.compile('mailto:', re.MULTILINE)
+        text = p.sub(r'', text)
 
         # line breaks
-        p=re.compile('(?<!~)%%%',re.MULTILINE)
-        text = p.sub(r'[[BR]]',text)
+        p = re.compile('(?<!~)%%%', re.MULTILINE)
+        text = p.sub(r'[[BR]]', text)
 
         # unescape
         # This must stay the last filter or things will break real bad
-        p=re.compile('~(~?)',re.MULTILINE)
-        text = p.sub(r'\1',text)
+        p = re.compile('~(~?)', re.MULTILINE)
+        text = p.sub(r'\1', text)
 
         return text
 
@@ -345,18 +345,18 @@
                 host=host,
                 db=db,
                 user=user,
-                passwd=passwd
+                passwd=passwd,
         )
-cursor = db.cursor();
+cursor = db.cursor()
 
-stmt="SELECT pagename,content,versiondata FROM page,recent,version WHERE " + pagename + \
-      " page.id=version.id AND version.id=recent.id AND version=latestversion" + \
-      " ORDER BY pagename"
+stmt = "SELECT pagename,content,versiondata FROM page,recent,version WHERE " + pagename + \
+       " page.id=version.id AND version.id=recent.id AND version=latestversion" + \
+       " ORDER BY pagename"
 cursor.execute(stmt)
 
 # loop over the matching phpwiki pages
 result = cursor.fetchall()
-for pagename,content,versiondata in result:
+for pagename, content, versiondata in result:
         utf8pagename = unicode(pagename, 'latin-1')
         request = Request(utf8pagename)
         page = PageEditor(utf8pagename, request)
@@ -365,11 +365,11 @@
         if not editExistingPages and page.exists():
                 print " already exists, skipping"
                 continue
-        
+
         # find out in the serialized field what markup type (old
         # style?) this page is in
         match = re.compile('s:6:"markup";s:[0-9]*:"([0-9]*)";').search(versiondata)
-        if match != None:
+        if match is not None:
                 # markup is 1 (old style) or 2 (new style)
                 markup = match.group(1)
         else:
@@ -382,9 +382,9 @@
         print (markup == 2 and [""] or ["(old style)"])[0],
 
         # do the actual parsing of this page and save it
-        text=blockparser(content,markup)
+        text = blockparser(content, markup)
         try:
-                err = page.saveText(unicode(text,'latin-1'), '0')
+                err = page.saveText(unicode(text, 'latin-1'), '0')
         # the exceptions thrown by saveText are errors or messages, so
         # just print both
         except Exception, msg:
@@ -392,8 +392,9 @@
         else:
                 if err:
                         print err,
-                
+
         # the EOL
         print
-        
+
 db.close
+
--- a/jabberbot/commands.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/jabberbot/commands.py	Mon Jul 02 23:33:20 2007 +0200
@@ -15,12 +15,12 @@
     def __init__(self, jid, text):
         self.jid = jid
         self.text = text
-        
+
 class AddJIDToRosterCommand:
     """Class representing a request to add a new jid to roster"""
     def __init__(self, jid):
         self.jid = jid
-        
+
 class RemoveJIDFromRosterCommand:
     """Class representing a request to remove a jid from roster"""
     def __init__(self, jid):
@@ -33,52 +33,52 @@
 
 class BaseDataCommand(object):
     """Base class for all commands used by the XMPP component.
-    
+
     It has to support an optional data payload and store JID the
     request has come from and provide a help string for its parameters.
     """
-    
+
     # Description of what the command does
     description = u""
-    
+
     # Parameter list in a human-readable format
     parameter_list = u""
-    
+
     def __init__(self, jid):
         self.jid = jid
         self.data = None
-        
+
 class GetPage(BaseDataCommand):
-    
+
     description = u"retrieve raw content of a named page"
     parameter_list = u"pagename"
-    
+
     def __init__(self, jid, pagename):
         BaseDataCommand.__init__(self, jid)
         self.pagename = pagename
-        
+
 class GetPageHTML(BaseDataCommand):
-    
+
     description = u"retrieve HTML-formatted content of a named page"
     parameter_list = u"pagename"
-    
+
     def __init__(self, jid, pagename):
         BaseDataCommand.__init__(self, jid)
         self.pagename = pagename
-        
+
 class GetPageList(BaseDataCommand):
-    
+
     description = u"get a list of accesible pages"
     parameter_list = u""
-    
+
     def __init__(self, jid):
         BaseDataCommand.__init__(self, jid)
 
 class GetPageInfo(BaseDataCommand):
-    
+
     description = u"show detailed information about a page"
     parameter_list = u"pagename"
-    
+
     def __init__(self, jid, pagename):
         BaseDataCommand.__init__(self, jid)
         self.pagename = pagename
--- a/jabberbot/config.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/jabberbot/config.py	Mon Jul 02 23:33:20 2007 +0200
@@ -6,13 +6,14 @@
     @license: GNU GPL, see COPYING for details.
 """
 
+
 class BotConfig:
     # Node name (username on the jabber server) to be used
     xmpp_node = u"moinbot"
 
     # Server to be used
     xmpp_server = u"jabber.example.com"
-    
+
     # Port to connect to or None, if default
     xmpp_port = None
 
@@ -21,23 +22,23 @@
 
     # Password used to connect to the xmpp server
     xmpp_password = u""
-    
+
     # Status message that the bot should set
     xmpp_status = u"Ready to serve!"
-        
-    # Set to True if bot should be verbose about actions it 
+
+    # Set to True if bot should be verbose about actions it
     # is performing. Useful for debuging.
     verbose = True
 
     # Interface to listen on for XML RPC traffic
     xmlrpc_host = u"localhost"
-    
+
     # Port to listen on for XML RPC traffic
     xmlrpc_port = 8000
-    
+
     # Url where wiki is located (for reverse XML RPC traffic)
     wiki_url = u"http://localhost:8080/"
-    
+
     # A secret shared with Wiki , must be the same in both
     # configs for communication to work.
     #
--- a/jabberbot/main.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/jabberbot/main.py	Mon Jul 02 23:33:20 2007 +0200
@@ -17,32 +17,33 @@
 
 def main():
     args = sys.argv
-    
+
     if "--help" in args:
         print """MoinMoin notification bot
-        
+
         Usage: %(myname)s [--server server] [--xmpp_port port] [--user user] [--resource resource] [--password pass] [--xmlrpc_host host] [--xmlrpc_port port]
-        """ % { "myname": os.path.basename(args[0]) }
-        
+        """ % {"myname&quo