July 19th, 2004, 04:23 PM
help with os.spawnl() function??
I am using os.Spawnl(os.P-Wait,'.exe file","") to run .exe file from python script on windows an wait for application to finish and then execute ptyhon script further.
It ptyhon script opens .exe files, but after few seconds when i checked it, it makes CPU usage 100%. That's why after few second my program will hang the computer. Once i stop the running ptyhon it works fine.
I do not know what could be problem? because i am waiting for opend .exe program to finish and stop execution of python script until that.
what could be solution to this or other approachto run .exe file from python?
I ahev to finish this by tommorow... Please provide you inputs... everything is welcome....
I tried using all possible tricks and ways.
July 20th, 2004, 12:41 PM
Have you tried os.system() or the os.popen() functions? They'd be my first choice, not that i've got anything against os.spawnl(), but i havn't used it or seen it used before so .
Anyway, im sure you mean os.P_WAIT since os.P-WAIT will cause an error, so you might wana check that. You may also want to do a quick search of the forum since im sure we covered waiting for a process pretty recently .