execv/spawnv on windows

Brian Elmegaard be at et.dtu.dk
Thu Aug 24 08:10:28 EDT 2000


Hi,

I tried to run an application from python under win98. This worked if I
did:
gs=os.execv("c:\ees32\ees.exe",())

However, if I do
gs=os.execv("c:\Aladdin\gs6.0\bin\gswin32c.exe",())

an error saying
OSError: [Errno 2] No such file or directory
comes up. Well, as the output of
print os.listdir("c:/Aladdin/gs6.0/bin")
is
['gsdll32.dll', 'gswin32.exe', 'gswin32c.exe', 'gs16spl.exe', 'xxx2pdf']

I am quite sure it _is_ there.

So what is the reason? Too long path or the point in the pathname or...?

Furthermore, why do I need backslashes with execv and slashes with
listdir? 
And last, is it execv I need? What if I want to grab the output of the
command into a string?

I-would-like-to-know-how-to-write-a-very-peculiar-'ly-yours-'ly-yours,
Brian



More information about the Python-list mailing list