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

2013-10-29 Thread telmich
telmich added the comment: sorry for the noise, it was too early in the morning! -- ___ Python tracker ___ ___ Python-bugs-list mailin

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

2013-10-29 Thread R. David Murray
Changes by R. David Murray : -- Removed message: http://bugs.python.org/msg201627 ___ Python tracker ___ ___ Python-bugs-list mailing

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

2013-10-29 Thread R. David Murray
R. David Murray added the comment: Indeed, you can see in the original posting that the \ is already gone from the dollar in sys.argv, so argparse has nothing to do with it. And it is indeed the shell doing the unescaping: rdmurray@session:~>cat test.sh #!/bin/bash echo "$@" rdmurray@session:~

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

2013-10-29 Thread R. David Murray
R. David Murray added the comment: Indeed, you can see in the original posting that the \ is already gone from the dollar in sys.argv, so argparse has nothing to do with it. And it is indeed the shell doing the unescaping: rdmurray@session:~>cat test.sh #!/bin/bash echo "$@" rdmurray@session:~

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

2013-10-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed, this sounds very much like the shell doing the unescaping, rather than argparse. (I wonder why argparse would special-case $, anyway) -- nosy: +pitrou ___ Python tracker _

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

2013-10-29 Thread Ezio Melotti
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', "

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

2013-10-29 Thread telmich
telmich added the comment: Background information: cdist is written in python 3 and makes heavy use of argparse. One common task is to run a cdist type with some arguments, which in the end configure a remote system. We triggered the bug by running __line ps1 --file /etc/bash.bashrc --line "PS

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

2013-10-29 Thread telmich
Changes by telmich : -- title: argparse replaces \$ to is passed -> argparse replaces \$ with $ (if in commandline) ___ Python tracker ___ _