[issue19430] argparse replaces \$ with $ (if in commandline)

Ezio Melotti report at bugs.python.org
Tue Oct 29 10:49:56 CET 2013


Ezio Melotti added the comment:

I don't think this is related to argparse:
$ echo 'import sys; print(sys.argv)' > issue19430.py
$ python issue19430.py ps1 --file /etc/bash.bashrc --line "PS1='[\t] \[\033[1m\]\h\[\033[0m\]:\w\$ '"
['issue19430.py', 'ps1', '--file', '/etc/bash.bashrc', '--line', "PS1='[\\t] \\[\\033[1m\\]\\h\\[\\033[0m\\]:\\w$ '"]
$ python issue19430.py "\$"
['issue19430.py', '$']
$ python issue19430.py '\$'
['issue19430.py', '\\$']

----------
nosy: +ezio.melotti

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19430>
_______________________________________


More information about the Python-bugs-list mailing list