What is the best way to handle a command line argument that includes an escape sequence like \n?
steven.bethard at gmail.com
Thu Mar 3 01:35:41 CET 2005
> It appears that Python treats the comand line string as a raw string.
> what is the best way to work around the issue?
You probably want to use str.decode with the encoding 'string_escape'
py> s = r'\n\t'
More information about the Python-list