On windows OS, this code saved as python_run.py in packages folder:
import sublime
import sublime_plugin
import subprocess
class PythonRunCommand(sublime_plugin.WindowCommand):
def run(self):
command = [‘cmd’,’/k’,r"C:\Python34\python.exe",sublime.active_window().active_view().file_name()]
subprocess.Popen(command)
key binding:
{
“keys”: “f2”],
“command”: “python_run”
}
The code above as it is only works on Windows, by just pressing F2, I can run any script, is it possible that the code above can be edited in such way that could function on Linux(Xubuntu)??