Fix Readline column calculation by marking non-printable escape sequences.
--- a/.pystartup Mon Feb 27 19:57:17 2012 +0200
+++ b/.pystartup Mon Feb 27 19:58:27 2012 +0200
@@ -23,9 +23,9 @@
term_with_colors = ['xterm', 'xterm-color', 'xterm-256color', 'linux', 'screen', 'screen-256color', 'screen-bce']
if os.environ.get('TERM') in term_with_colors:
- green='\033[32m'
- red='\033[31m'
- reset='\033[0m'
+ green='\001\033[32m\002'
+ red='\001\033[31m\002'
+ reset='\001\033[0m\002'
sys.ps1 = red + '>>> ' + reset
sys.ps2 = green + '... ' + reset
del term_with_colors