Reputation: 11011
I'm trying to run console commands via subprocess.Popen, and whenever I run it I get the windows "File not found" error, even when running the echo command. I am also using Popen inside a thread made with the thread module. Is that the problem?
Upvotes: 2
Views: 5256
Reputation: 57804
Instead ofD:\Program Files\Steam\steamapps\terabytest\sourcesdk\bin\orangebox\bin\vbsp.exe
, useD:/Program Files/Steam/steamapps/terabytest/sourcesdk/bin/orangebox/bin/vbsp.exe
This eliminates any complications with backslashes inside quotes.
Upvotes: 5
Reputation: 9466
echo
is not an executable, it's an internal command inside cmd.exe
. If you want to use Popen with internal commands, add a keyword parameter shell=True
Upvotes: 3