Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with os.spawnv 1

Status
Not open for further replies.

dans45

Technical User
Feb 13, 2003
43
US
Hello, I'm trying to spawn another python program and have to pass it a few arguments...
var1="12"
var2="1"
print "spawn prog"
pid=os.spawnv(os.P_NOWAIT, '/user/bin/python', ('python, 'myprog.py', var1, var2))
print "prog spawned"

When I execute this program all I see is:
spawn prog
prog spawned

Can you help me with this problem. I'm running this on linux.
Thanks from a novice.
Dan

 
Don't know if it's the problem, but you are missing a closing single quote around "python" in:

('python, 'myprog.py', var1, var2)

Should not it be?:

('python', 'myprog.py', var1, var2)


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top