Sublimetext2 Sublime Text 2 REPL使用用户插件运行iPython文件
我试图在Sublime Text 2中的交互式shell中运行iPython文件。这是我写的第一个插件 以下是我目前掌握的情况:Sublimetext2 Sublime Text 2 REPL使用用户插件运行iPython文件,sublimetext2,ipython,sublimerepl,Sublimetext2,Ipython,Sublimerepl,我试图在Sublime Text 2中的交互式shell中运行iPython文件。这是我写的第一个插件 以下是我目前掌握的情况: import sublime, sublime_plugin class IpydevCommand(sublime_plugin.WindowCommand): def run(self): self.window.run_command('repl_open',{"type": "subprocess",
import sublime, sublime_plugin
class IpydevCommand(sublime_plugin.WindowCommand):
def run(self):
self.window.run_command('repl_open',{"type": "subprocess",
"encoding": "utf8",
"cmd": ["ipython", "-i", "$file_basename"],
"cwd": "$file_path",
"syntax": "Packages/Python/Python.tmLanguage",
"external_id": "ipython",
})
self.window.run_command('move_to_group', { "group": 1 })
这里的问题是,我没有一个互动的环境后。景色一片混乱。有没有办法解决这个问题
谢谢不用运行笔记本,您可以在keymap绑定中使用以下配置直接调用ipython:- [ {“keys”:[“f9”],“command”:“repl_open”, “标题”:“Python-IPython”, “id”:“repl_python_ipython”, “助记符”:“p”, “args”:{ “类型”:“子流程”, “编码”:“utf8”, “自动完成服务器”:true, “cmd”:{ “osx”:[“python”、“-u”、“${packages}/submiterepl/config/python/ipy_repl.py”], “linux”:[“python”、“-u”、“${packages}/submiterepl/config/python/ipy_repl.py”], “windows”:[“python”、“-u”、“${packages}/submiterepl/config/python/ipy_repl.py”] }, “cwd”:“$file_path”, “语法”:“Packages/Python/Python.tmLanguage”, “外部id”:“python”, “扩展环境”:{ “Python编码”:“utf-8”, “升华编辑器”:“$EDITOR” } } } ]
因此,单击F9,它将在新shell上打开ipython您应该使用宏而不是插件来完成此操作。。。