[Pywikipedia-l] SVN: [6441] branches/rewrite/pywikibot/bot.py

russblau at svn.wikimedia.org russblau at svn.wikimedia.org
Wed Feb 25 21:34:16 UTC 2009


Revision: 6441
Author:   russblau
Date:     2009-02-25 21:34:16 +0000 (Wed, 25 Feb 2009)

Log Message:
-----------
Line separator issue for STDOUT

Modified Paths:
--------------
    branches/rewrite/pywikibot/bot.py

Modified: branches/rewrite/pywikibot/bot.py
===================================================================
--- branches/rewrite/pywikibot/bot.py	2009-02-25 13:40:47 UTC (rev 6440)
+++ branches/rewrite/pywikibot/bot.py	2009-02-25 21:34:16 UTC (rev 6441)
@@ -16,6 +16,7 @@
 
 import logging, logging.handlers
        # all output goes thru python std library "logging" module
+import os
 import os.path
 import sys
 
@@ -111,7 +112,7 @@
             except UnicodeDecodeError:
                 text = unicode(text, 'iso8859-1')
     if newline:
-        text += u'\n'
+        text += os.linesep
     if toStdout:
         level = STDOUT
     ui.output(text, level=level)





More information about the Pywikipedia-l mailing list