move readline
authorthomasv <thomasv@gitorious>
Mon, 7 Oct 2013 17:53:42 +0000 (19:53 +0200)
committerthomasv <thomasv@gitorious>
Mon, 7 Oct 2013 17:53:42 +0000 (19:53 +0200)
electrum

index 38a2433..1a6e0e0 100755 (executable)
--- a/electrum
+++ b/electrum
@@ -18,7 +18,7 @@
 
 import re
 import pkgutil
-import sys, os, time, json, readline
+import sys, os, time, json
 import optparse
 import platform
 from decimal import Decimal
@@ -166,7 +166,11 @@ if __name__ == '__main__':
         time.sleep(0.1)
         sys.exit(0)
 
-
+    # Python bug (http://bugs.python.org/issue1927) causes raw_input
+    # to be redirected improperly between stdin/stderr on Unix systems
+    # if readline is not initialised first.
+    import readline
+    
     if cmd not in known_commands:
         cmd = 'help'