import os id = os.spawnl(os.P_NOWAIT, "c:/Windows/Notepad.exe") status = os.waitpid( id, 0 ) print status