A simpler solution is to install SublimeREPL , there is a REPL shell. You can add a layout to your user configuration. However, this will open the shell inside Sublime.
If you prefer, the old script still works. Instead of putting them ( cmd.py and Context.sublime-menu ) in the cmd directory, you put them in the cmd directory, which should be uppercase.
And I simplified the script, here:
import os, sublime_plugin class CmdCommand(sublime_plugin.TextCommand): def run(self, edit): path, _ = os.path.split(self.view.file_name()) os.chdir(path) os.system('cmd')
Kabie source share