Message22925
Logged In: YES
user_id=431773
I looked at the code and the problem is here:
def _execute_child(self, args, executable, preexec_fn, close_fds,
cwd, env, universal_newlines,
startupinfo, creationflags, shell,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite):
"""Execute program (POSIX version)"""
if isinstance(args, types.StringTypes):
args = [args]
if shell:
args = ["/bin/sh", "-c"] + args
if executable == None:
executable = args[0]
You can se that if shell is true (as it must be if one specifies args as a string)
and executable is supplied, one ends p with a mess, i.e. the executable ends
up trying to execute ["/bin/sh", "-c", args]
Fortunately cwd offers a hackaround. Still, I hope this can be either fixed or
else can produce a warning.
While on that subject, should specifying args as a string without specifying
shell=True should produce a warning?
Thanks for subprocess. It's a wonderful module. I am really looking forward
to using it (once a few kinks get worked out). |
|
Date |
User |
Action |
Args |
2007-08-23 14:27:09 | admin | link | issue1056441 messages |
2007-08-23 14:27:09 | admin | create | |
|