On Thu, Dec 22, 2016 at 4:50 AM, <c...@zip.com.au> wrote: > BTW, the array form is Popen's default mode; sensibly you need to _ask_ to > use a shell string with shell=True, because that is harder and more fragile.
Without shell=True, args as a string on POSIX is generally an error because it will look for the entire string as the executable. The exception is if the string has no command-line arguments (e.g. Popen('ls')). On Windows it's always acceptable to pass args as a string. For a complex command line it may be easier to pass args as a list and let Popen call list2cmdline to create a string that's properly quoted and escaped. Here 'properly' assumes the target executable parses its command line using VC++ rules. It may use custom rules, in which case you have to pass args as a string. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor