Steven D'Aprano <st...@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. Marko -- https://mail.python.org/mailman/listinfo/python-list