Quote:
|
Originally Posted by Sane
Oh, I totally missed the first thing you said. About it working with those arguments! The third parameter in os.spawnl is where the arguments begin, yet you began 'sig5C' on the fourth parameter. Your code has three additional arguments, when your working example has only two. It seems that you've repeated "READER" excessively.
|
The same error occurs whether or not I pass in the program to execute twice, and although the os.spawnl docs would seem to agree with what you say, every example I have found online seems to follow this pattern. So, I'm trying everything both ways.
Quote:
|
Originally Posted by Sane
The program may not like arguments with forward slashes in them. Try writing a python script that spits out the arguments (sys.argv). Then direct your code to open that script and see what the arguments are translating to within the script.
|
That's a good idea, and I tried it, and am having even more problems. I created two scripts, poster.py and getter.py. Here is poster.py:
import os
execpath = os.path.abspath('getter.py')
os.spawnl(os.P_WAIT, execpath, 'arg1', 'arg2') Can you see anything wrong with this? (I get an identical error regardless of whether the second argument is repeated.) I think you're right about the problem having something to do with slashes/spaces, but I can't figure it out.
Traceback (most recent call last):
File "C:\Documents and Settings\jboyle\Desktop\DataView\optargs\poster.py", line 3, in ?
os.spawnl(os.P_WAIT, PATH, PATH, 'arg1', 'arg2')
File "C:\Python24\Lib\os.py", line 597, in spawnl
return spawnv(mode, file, args)
OSError: [Errno 8] Exec format error
Script terminated.