os.spawnve args bug?
tim_one at email.msn.com
Fri Nov 10 22:01:47 CET 2000
> But this next one works, and the first argument is seemingly
> totally ignored by the application:
> args = ['dummy', '-create']
> Is this a bug or a feature?
Feature, inherited from Unix. All OS spawn/exec functions work this way.
The current development version of the docs should make this much clearer
(it's darned near a FAQ).
> Am I expected to set args to the path of the executable file?
Depends entirely on the app you're calling. args becomes argv in the
spawned process, and *some* apps look at that to decide what to do (for
example, on Unix it's common for file compression and decompression
utilities to be links to the same executable, differing only in the name of
the link -- the executable then looks at argv to decide whether it should
compress or decompress). In doubt, yes, set args to the path of the
hacks-endure-ly y'rs - tim
More information about the Python-list