Everything good about Python except GUI IDE?

Chris Angelico rosuav at gmail.com
Wed Mar 2 00:58:21 EST 2016


On Wed, Mar 2, 2016 at 4:41 PM, Marko Rauhamaa <marko at pacujo.net> wrote:
> Steven D'Aprano <steve at pearwood.info>:
>
>> On Wed, 2 Mar 2016 05:06 am, Marko Rauhamaa wrote:
>>> A python shell would need a well-thought-out default import plus a
>>> way to string together external commands. Maybe JSON or similar could
>>> be the standard I/O framing format (instead of SPC-separated fields
>>> and LF-separated records).
>>
>> You really want to be typing JSON by hand instead of space-separated
>> fields/arguments?
>>
>> # Python using JSON
>> ls('["-l", "foo/bar", "spam/ham"]')
>>
>> # bash
>> ls -l foo/bar spam/ham
>>
>> Bugger that for a game of soldiers.
>
> I was talking about JSON for the standard I/O, not the command-line
> arguments, as in:
>
>    ps -ef | awk '/httpd/ { print $2 }'
>
> where "ps -ef" emits SPC-separated fields and LF-separated records, and
> awk parses and processes them.

If you want to change that, you have to change the entire ecosystem,
not just the shell. You would have to teach every single program to
use a different structure.

A lot of programs already do support NUL-separation - usually with a
-z parameter or something. But you won't be able to magically get them
all to use JSON. And I doubt it would be advantageous anyway.

ChrisA



More information about the Python-list mailing list