Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:

There are several modules that expose some of their uses through command line 
like json.tool, zipfile, tarfile, gzip, webbrowser etc. The initial proposal 
was to expose the newly added indent function over the command line to provide 
the same guarantees and semantics. The lxml link lead me to have xpath search 
looks more useful to me. I understand that there was always discussion over 
writing few lines of Python code to do the task and to achieve it via command 
line. Recent addition were around 

* --json-lines added to json.tool in issue31553 
* Add --fast, --best to gzip CLI in issue34969

There were similar discussion where improvements were merged on a case by case 
basis as seen to be a good use case. Some where more on the side of rejection 
like --indent to specify indentation length for json.tool in issue29636. There 
was no xml.tool in the past so there is more consideration to this. I see it 
good that xml also can expose some of its tasks via command line and not to be 
left just because it never had a command line interface from the start. The 
command line API also exposes only the functions already present so I see the 
maintenance cost to be minimal with indent and xpath search in this case. I 
will leave it to you as per the examples and use cases mentioned. If it needs a 
wider discussion on posting to python-ideas/discourse I would be okay to start 
a thread .

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37940>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to