【发布时间】:2014-01-03 15:31:00
【问题描述】:
如何使用 Canopy IDE 创建键盘快捷键以在代码编辑器和 ipython 控制台之间切换?
我已尝试根据代码编辑文档 (http://docs.enthought.com/canopy/configure/editor-scripting-api.html#code-editor-scripting-commands) 和 ipython 窗格脚本命令 (http://docs.enthought.com/canopy/configure/ipython-scripting-api.html#ipython-pane-scripting-commands) 编写宏,但没有看到解决方案。
例如,我有一个宏将执行当前代码行(无需选择它),但如果能够在执行后将光标切换回代码编辑器而无需触摸鼠标,那就太好了/触控板。
def run():
code_task = get_active_task()
code_editor = code_task.active_editor
cursor = code_editor.cursor
cursor.start_of_line()
cursor.next_line(select=True)
code_task.run_selection()
在 Mac OS X 10.7.5 上使用 Canopy 版本:1.1.1(64 位)
【问题讨论】:
标签: canopy epd-python