[issue20451] os.exec* mangles argv on windows (splits on spaces, etc)

R. David Murray report at bugs.python.org
Tue Feb 4 15:01:49 CET 2014


R. David Murray added the comment:

I believe the problem lies with the way that Windows implements the 'exec' functions.  Windows isn't posix, and sometimes its attempts to fake it go rather badly.  So, I'm not sure what the actual rules are, but whatever they are there should at least be a mention/pointer in the documentation about it.

Really, if you want to be cross platform you should use subprocess.  exec doesn't really even exec (replace the current process) on windows, if I understand correctly.

By the way, -c accepts strings with embedded newlines, something I didn't know for a long time :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20451>
_______________________________________


More information about the Python-bugs-list mailing list