Thanks Wesley,
I lokked for
subprocess.Popen.
os.spawnlp(os.P_NOWAIT, /bin/mycmd, mycmd,
myarg) was to complicated for me based on the manual.
Yours sincerely,
__
János Juhász
VELUX Magyarország Fertődi Építőkomponens Kft.
IT Department
Malom Köz 1, H-9431 Fertőd
Telephone direct:
+36 99 537 939
Telephone office: +36 99 537 920
Office fax:+36
99 537 921
Telephone mobile: +36 30 682 6331
@
[EMAIL PROTECTED]
www
www.VELUX.com
wesley chun [EMAIL PROTECTED]
2006.08.07 22:28
To
János Juhász
[EMAIL PROTECTED]
cc
tutor@python.org
Subject
Re: [Tutor] os.system()
with NO_WAIT
os.system('vedicom.exe')
Have you got any idea how I can strart this windows GUI program with
not
waiting its return.
instead of os.system(), you want to use the subprocess
module if you
are using Python 2.4+:
http://docs.python.org/lib/module-subprocess.html
calling subprocess.Popen([/bin/mycmd,
myarg]) is no wait.
to save the PID:
pid = subprocess.Popen([/bin/mycmd, myarg]).pid
if you are using Python 2.3.x and older, you have
to use spawn*():
pid = os.spawnlp(os.P_NOWAIT, /bin/mycmd,
mycmd, myarg)
hope this helps!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Core Python Programming, Prentice Hall, (c)2007,2001
http://corepython.com
wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor