100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > sublime运行python代码 如何从Sublime Text 2运行Python代码?

sublime运行python代码 如何从Sublime Text 2运行Python代码?

时间:2022-01-23 23:14:18

相关推荐

sublime运行python代码 如何从Sublime Text 2运行Python代码?

I want to set up a complete Python IDE in Sublime Text 2.

I want to know how to run the Python code from within the editor. Is it done using build system? How do I do it ?

解决方案

Tools -> Build System -> (choose) Python then:

To Run:

Tools -> Build

-or-

Ctrl + B

CMD + B (OSX)

This would start your file in the console which should be at the bottom of the editor.

To Stop:

Ctrl + Break or Tools -> Cancel Build

Fn + C (OSX)

You can find out where your Break key is here: /wiki/Break_key.

Note: CTRL + C will NOT work.

What to do when Ctrl + Break does not work:

Go to:

Preferences -> Key Bindings - User

and paste the line below:

{"keys": ["ctrl+shift+c"], "command": "exec", "args": {"kill": true} }

Now, you can use ctrl+shift+c instead of CTRL+BREAK

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。