On 28/10/2016 01:08, Chris Angelico wrote:
On Fri, Oct 28, 2016 at 10:45 AM, BartC <b...@freeuk.com> wrote:
On 27/10/2016 23:31, Chris Angelico wrote:
When
you exec to a process, you provide multiple arguments, not a single
combined string.
Really, there could be dozens of arguments? Windows' CreateProcess() (if
that's the same thing) has ten of which one is the command-line as a single
string, while C's system() just has one.
system() passes its argument through to the shell for parsing. In the
same way, Python's Popen constructor can either take a list of
strings, or a single string.
This might just be one of those Unixisms that doesn't apply on all
platforms.
Or maybe the single-string form is a Windowsism that doesn't apply on
any other platforms. Let me go dig up my OS/2 Assembly Language
Programming Reference...
OK. What comes out of this is that single- or multi-string ways passing
the contents of a line of input are both workable.
So perhaps my way of allowing more general line-input to be read an
item-at-a-time instead of as a single string isn't that off-the-wall either.
--
Bartc
--
https://mail.python.org/mailman/listinfo/python-list