Reputation: 2326
First of all, I know that this question was asked many many many times however I found no answer to my problem by reading the other answers.
I'm playing a bit with Sublime Text 3 but can't understand the build systems at all!
I have the simplest Python file ever containing only print 'test'
.
My build file is not much more complex, because it is:
{
"selector": "source.python",
"cmd": ["echo test"],
}
However, when trying to run it, I get:
[WinError 2] The system cannot find the file specified
[cmd: ['echo test']]
[dir: C:\P4\depot\test]
[path: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\CCM;C:\Python27\;C:\Python27\Scripts]
[Finished]
From what I understood, this error occurs mainly because of %PATH%
problems but I assume that it can't be the problem here as I call a system command.
So, do you have any idea how to fix it?
Thank you :)
Upvotes: 1
Views: 5511
Reputation: 2326
For those of you interested, the answer was simply to change:
"cmd": ["echo test"]
into
"shell_cmd": "echo test"
Once again, my question was not related to Python itself but more to build systems in Sublime Text that I've found very poorly documented.
Upvotes: 3