[Tutor] os.spawnv OSError errno 2 No such file or directory
Isaac
Isaac@compuserve.com
Wed, 12 Jul 2000 13:54:29 -0700
On win98, with python 1.5.2 for win32, I'm trying to run os.spawnv
(and/or os.spawnve), and I get an
OSError: [Errno 2] No such file or directory
I assume it's referring to the command file I'm trying to run, or
possibly the command processor (command.com), but I can't get it
past this error! Even if I just try to run command.com and give it an
absolute path name.
Incidentally, os.system( ) works ok, but I need a longer, more flexible
command line, so I thought spawn would be the solution.
Here's one example of what i've tried.
t = ['c:\\', "/w", "/p"]
mycmd = 'ls.bat'
import os
os.spawnv(os.P_WAIT, mycmd, t)
Traceback (innermost last):
File "<pyshell#4>", line 1, in ?
os.spawnv(0, mycmd, t)
OSError: [Errno 2] No such file or directory
Any help would be much appreciated. This is my first post to the list
-- please let me know if there is a preferred forum for this type of
question.
Thanks!
Best,
Isaac,