New submission from Benjamin Peterson: I current get this behavior: % python3 -m json.tool -h Traceback (most recent call last): File "/usr/lib64/python3.3/runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib64/python3.3/runpy.py", line 73, in _run_code exec(code, run_globals) File "/usr/lib64/python3.3/json/tool.py", line 40, in <module> main() File "/usr/lib64/python3.3/json/tool.py", line 21, in main infile = open(sys.argv[1], 'r') FileNotFoundError: [Errno 2] No such file or directory: '-h'
Instead of that, json.tool should show a helpful message expalining what it does in response to the -h or --help flags. ---------- components: Library (Lib) keywords: easy messages: 214261 nosy: benjamin.peterson priority: normal severity: normal stage: needs patch status: open title: json.tool ought to have a help flag type: enhancement versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21000> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com