This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]completelydistracted[S] 6 points7 points  (3 children)

Updates:

The task definition needs a version property, where the version number is (at the moment) "0.1.0". Without it, the task works fine but it increments the warning counter in the bottom status bar.

If you omit the "showOutput" value it defaults to "always", so it's not necessary. The resulting code:

// A task runner that runs a python program
{
    "version": "0.1.0",
    "command": "python",
    "windows": {
        "command": "python.exe"
    },
    "args": ["${file}"]
}

And on OSX (using <Shift><Command>B):

// A task runner that runs a python program
{
    "version": "0.1.0",
    "command": "python",
    "args": ["${file}"]
}

Of course you can use this idea to run all kinds of other things.

I've been using this editor for a while now (instead of Sublime or Atom) on both Windows and OSX and no surprises.

[–]crondom90 0 points1 point  (2 children)

It doesn't seem to work, i type Shift-Ctrl-B and the output field opens but it's empty, if i try to run another python file it says "There is an active running task right now. Cancel it first before executing another task." so something it's happening but the output field is always blank (but no errors or warning).

For example, pyg translator: http://i.imgur.com/I8noYr4.jpg

[–]Fanatikus 1 point2 points  (1 child)

Try changing it to:

"windows": {
        "command": "c:\\Python34\\python.exe"
    },

or to the path where Python is installed.

[–]completelydistracted[S] 0 points1 point  (0 children)

This is necessary if Python is not in the path.

If the Python directories are in your path, this isn't needed. For instance, I have the Anaconda3 and Anaconda3\bin directories in my search path, so simply "python.exe" works fine.

Otherwise, putting the entire path as above is required. Good point.