[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2017-02-23 Thread Daniel Himmelstein
Changes by Daniel Himmelstein <daniel.himmelst...@gmail.com>: -- pull_requests: +232 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue29636] Specifying indent in the json.tool command

2017-02-23 Thread Daniel Himmelstein
New submission from Daniel Himmelstein: The utility of `python -m json.tool` would increase if users could specify the indent level. Example use case: newlines in a JSON document are important for readability and the ability to open in a text editor. However, if the file is large, you can

[issue29636] Specifying indent in the json.tool command

2017-02-27 Thread Daniel Himmelstein
Changes by Daniel Himmelstein <daniel.himmelst...@gmail.com>: -- pull_requests: +298 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue29636] Specifying indent in the json.tool command

2017-02-27 Thread Daniel Himmelstein
Changes by Daniel Himmelstein <daniel.himmelst...@gmail.com>: -- pull_requests: -230 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue29636] Specifying indent in the json.tool command

2017-02-27 Thread Daniel Himmelstein
Daniel Himmelstein added the comment: For discussion on how to implement this, see + https://github.com/python/cpython/pull/201#discussion_r102146742 + https://github.com/python/cpython/pull/201#discussion_r102840190 + https://github.com/python/cpython/pull/201#discussion_r102891428

[issue29636] Specifying indent in the json.tool command

2017-03-16 Thread Daniel Himmelstein
Daniel Himmelstein added the comment: @serhiy.storchaka I totally understand the desire to keep json.tool simple. However, given the description of json.tool in the documentation (below), I think an indentation option is within scope: > The json.tool module provides a simple command l

[issue29636] Specifying indent in the json.tool command

2017-04-13 Thread Daniel Himmelstein
Daniel Himmelstein added the comment: @bob.ippolito thanks for pointing to jq as a reference implementation. I updated the pull request (https://git.io/vS9o8) to implement all of the relevant options. Currently, the PR supports the following mutually exclusive arguments: --indent --no-indent

[issue29636] Specifying indent in the json.tool command

2017-03-03 Thread Daniel Himmelstein
Daniel Himmelstein added the comment: To recap the discussion from https://git.io/vyCY8: there are three potential mutually exclusive command line options that have been suggested. There are as follows. ```python import json obj = [1, 2] print('--indent=4') print(json.dumps(obj, indent=4

[issue29636] Specifying indent in the json.tool command

2017-07-15 Thread Daniel Himmelstein
Changes by Daniel Himmelstein <daniel.himmelst...@gmail.com>: -- pull_requests: +2778 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2017-07-15 Thread Daniel Himmelstein
Changes by Daniel Himmelstein <daniel.himmelst...@gmail.com>: -- pull_requests: +2779 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue30971] Improve code readability of json.tool

2017-07-19 Thread Daniel Himmelstein
New submission from Daniel Himmelstein: In https://github.com/python/cpython/pull/2720, I propose code changes to the json.tool command line utility. These changes are entirely non-functional and instead focus on improving code readability, style, brevity, extensibility, and maintainability

[issue32160] lzma documentation: example to XZ compress file on disk

2017-11-28 Thread Daniel Himmelstein
New submission from Daniel Himmelstein <daniel.himmelst...@gmail.com>: The documentation for the lzma module currently contains 6 examples (https://docs.python.org/3.6/library/lzma.html#examples). However, it does not include an example to XZ compress a file on disk. The functionali

[issue32160] lzma documentation: example to XZ compress file on disk

2017-11-28 Thread Daniel Himmelstein
Change by Daniel Himmelstein <daniel.himmelst...@gmail.com>: -- assignee: -> docs@python components: +Documentation nosy: +docs@python type: -> enhancement ___ Python tracker <rep...@bugs.python.org> <https://bugs.

[issue32160] lzma documentation: example to XZ compress file on disk

2017-11-28 Thread Daniel Himmelstein
Daniel Himmelstein <daniel.himmelst...@gmail.com> added the comment: > we could consider an API addition Just brainstorming here... perhaps an API addition would be most appropriate in the shutil module (https://docs.python.org/3.6/library/shutil.html) which already

[issue18943] argparse: default args in mutually exclusive groups

2018-02-22 Thread Daniel Himmelstein
Change by Daniel Himmelstein <daniel.himmelst...@gmail.com>: -- pull_requests: +5593 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue34898] add mtime argument to gzip.compress

2019-08-23 Thread Daniel Himmelstein
Daniel Himmelstein added the comment: Any reason not to also expose mtime in the gzip.open API? -- nosy: +dhimmel ___ Python tracker <https://bugs.python.org/issue34

[issue22454] Adding the opposite function of shlex.split()

2019-09-06 Thread Daniel Himmelstein
Daniel Himmelstein added the comment: I am interested in shlex.join as a way to log subprocess.CompletedProcess.args as a string that users could run in their terminals. I initially assumed that this was also the scope of shlex.join. However, it seems that shlex.join does not accept all

[issue29636] Specifying indent in the json.tool command

2019-07-30 Thread Daniel Himmelstein
Daniel Himmelstein added the comment: Since opening this issue, I've encountered several additional instances where indentation control would have been nice. I don't agree that jq is a sufficient substitute: 1. jq is generally not pre-installed on systems. For projects where users

[issue29636] Specifying indent in the json.tool command

2019-12-05 Thread Daniel Himmelstein
Change by Daniel Himmelstein : -- pull_requests: +16961 pull_request: https://github.com/python/cpython/pull/17482 ___ Python tracker <https://bugs.python.org/issue29