tmove readline - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 1741d1cbd09990fcb20ea7c04d6d0c29a78beb02 DIR parent 29848e64a2c6d86c0ac0ac73d4cd3c1b4a07e254 HTML Author: thomasv <thomasv@gitorious> Date: Mon, 7 Oct 2013 19:53:42 +0200 move readline Diffstat: M electrum | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- DIR diff --git a/electrum b/electrum t@@ -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 t@@ -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'