1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Rep Power

    Question 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.
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Hull, UK
    Rep Power
    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 .

    Have fun,

    programming language development: www.netytan.com Hula

IMN logo majestic logo threadwatch logo seochat tools logo