fix python color prompt in bpython-0.17

This commit is contained in:
Martinez 2018-01-13 00:06:41 +01:00
parent 6f7247382b
commit 3f02d344dd

View file

@ -9,7 +9,7 @@ try:
except:
pass
# bpython defines __name__ == "__console__" and gets broken by ANSI colors, so...
if __name__ == "__main__":
# bpython gets broken by ANSI colors, so skip those
if type(__builtins__) != dict:
sys.ps1 = '\001\x1b[1;32m\002>>> \001\x1b[0m\002'
sys.ps2 = '\001\x1b[0;32m\002... \001\x1b[0m\002'