ha...@barney.  committed 5095bcc

initLocale() leaves sys.{stdout,stderr} unchanged if readline is loaded

Fix ipython issue.

  • Participants
  • Parent commits 21ba061

Comments (0)

Files changed (1)

File hachoir-core/hachoir_core/

     # Get the terminal charset
     charset = getTerminalCharset()
-    if config.unicode_stdout:
+    # UnicodeStdout conflicts with the readline module
+    if config.unicode_stdout and ('readline' not in sys.modules):
         # Replace stdout and stderr by unicode objet supporting unicode string
         sys.stdout = UnicodeStdout(sys.stdout, charset)
         sys.stderr = UnicodeStdout(sys.stderr, charset)