Hi, just started using ST2 and would like to use it with Python VirtualEnv.
I created a new .sublime-build file with following content.
{
"cmd": "/Path/to/VirtualEnv/bin/python", "/Another/Path/to/myscript.py"]
}
this works just fine … but this feels a bit restricted, as my .py-file is hardcoded into the custom build system.
I would like to use something like this (Pseudo-)Code:
{
"cmd": "/Path/to/VirtualEnv/bin/python", $CurrentFile]
}
Where “$CurrentFile” would point to the file, which tab is in the foreground and Cmd+B (OS X) therefore is triggered for that file’s building or here more executing purpose.
I tried without the , "/Another/Path/to/myscript.py"
part, which seemingly did not execute the file’s tab currently in foreground and focus, it only opened the Python environment in the Console of ST2.
I assume something like ‘self’ or ‘this’ might be the key, but I do not find the syntax Sublime Text 2 expects. here.
Thanks in advance for any help or hint,
Cheers,
Ulf