os.spawnve args bug?

Neil Cerutti cerutti at together.net
Fri Nov 10 14:38:46 EST 2000


I'm not sure if this is a bug or just me not understanding the
interface.

I've written a GUI front-end to the slrn news reader which
facilitates using multiple news-servers and easily adding and
removing servers from your list. I need to call slrn with an
altered environment, and also an optional argument, '-create' if
the newsrc file for a particular server needs to be set up.

This is the win32 port of PythonLabs 2.0final on NT.

os.spawnve(os.P_WAIT, SLRN_PATH+'/slrn.exe', args, os.environ)

The documentation says: "args must be a tuple or list of
strings."

I couldn't get the '-create' argument to work with spawnve for
several tries, until I stuck a dummy, non-empty string at the
head of the list. The following values of args did not work:

args = ['-create']
args = ['', '-create']

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? Am I expected to set args[0] to the
path of the executable file?

-- 
Neil Cerutti <cerutti at together.net>
Linux on board. It is now safe to turn on your computer.



More information about the Python-list mailing list