Parser in python3 does not take delimiter values from commandline via argparse

萝らか妹 提交于 2019-12-06 03:04:07

You can also pass the Tab character in a *nix shell (bash for example) by pressing Ctrl+V followed by Tab enclosed in quotes (single or double), i.e. type " Ctrl+V Tab ".

Your shell is interpreting the \t in your command line and what's getting passed to Python is, most likely, a single t. Try \\t or '\t' to get the literal two-character escape sequence into the argv. Then you'll need to unescape this string in Python:

delimiter = delimiter.decode("string-escape") 
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!