New submission from Ondřej Profant:
I am trying to put tabulator '\t' into argument value.
Minimal working example:
<code>
#!/usr/bin/env python3
import argparse
def main():
parser = argparse.ArgumentParser()
parser.add_argument('-f', '--foo', default="test", help="test")
args = parser.parse_args()
print("Argument foo is: " + args.foo + "|")
print("Tabulator usage: |\t|")
if __name__ == '__main__':
main()
</code>
My attempts:
./test.py -f \t
./test.py -f '\t'
./test.py -f "\t"
But this is not functional. Is there way to put special characters into
argument?
~
----------
components: Library (Lib)
messages: 251580
nosy: Ondřej Profant
priority: normal
severity: normal
status: open
title: Argparse module and escape sequence (special symbols) in argument value
type: behavior
versions: Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue25231>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com