Skip to content Skip to sidebar Skip to footer

Python Os.system Command Not Working?

Earlier I used to code in python well, but after I formatted my computer and reinstalled the same python setup, my os.system command stopped working, as well as subprocess.Popen.

Solution 1:

Looks like a path issue. The only way I could reproduce that -1 error was by setting my path to nothing so that Python couldn't find cmd.exe.

Here's a link I ran across by searching for "set windows path" in stack exchange:

http://support.microsoft.com/kb/310519

It tells how to set it for Winddows XP, the procedure is pretty much the same in later versions in that you're basically setting up environment variables which are stored in the registry.


Post a Comment for "Python Os.system Command Not Working?"