Revision: 5589 Author: russblau Date: 2008-06-17 21:47:23 +0000 (Tue, 17 Jun 2008)
Log Message: ----------- fix unicode bug
Modified Paths: -------------- branches/rewrite/pywikibot/__init__.py
Modified: branches/rewrite/pywikibot/__init__.py =================================================================== --- branches/rewrite/pywikibot/__init__.py 2008-06-17 21:47:08 UTC (rev 5588) +++ branches/rewrite/pywikibot/__init__.py 2008-06-17 21:47:23 UTC (rev 5589) @@ -9,7 +9,9 @@ # __version__ = '$Id: $'
+import sys import logging + from exceptions import * import config
@@ -65,6 +67,8 @@ print text
def input(prompt, password=False): + if isinstance(prompt, unicode): + prompt = prompt.encode(sys.stdout.encoding, "replace") if password: import getpass return getpass.getpass(prompt)