python學習筆記(2)--sublimeText3運行python

來源:互聯網
上載者:User

標籤:pack   line   loaded   方便   shel   學習   bio   table   pac   

https://www.zhihu.com/question/22904994

知乎使用者 To the knowledge74 人贊同如果是想在sublime裡要python shell那種互動或者run module F5 F5 F5下這種效果的話,還是挺容易實現的,windows下的:
1. 開啟Sublime text 3 安裝package control
Sublime Text 3 安裝Package Control

2. 安裝 SublimeREPL

Ctrl+shift+p 鍵入 install packages

稍等片刻後 鍵入 SublimeREPL 安裝即可

通過選項Tools->SublimeREPL->Python就可以看到效果了

3. 鍵位綁定

當然每次通過Tools->SublimeREPL->Python這樣的方式比較繁瑣

將這樣的操作和一個按鍵如F1綁定後,就會方便很多啦

e.g.開啟Preferences->Key Bindings-User,複製一下代碼:

{"keys":["f1"],"caption": "SublimeREPL: Python","command": "run_existing_window_command", "args":{"id": "repl_python","file": "config/Python/Main.sublime-menu"}}
Ctrl+s下就好了~

相較於純白如雪的原版idle,Sublime實在是色彩繽紛:-)
ps 如果還想編譯下熱乎乎的py代碼,可以複製以下代碼:
{"keys":["f2"],"caption": "SublimeREPL: Python - RUN current file","command": "run_existing_window_command", "args":{"id": "repl_python_run","file": "config/Python/Main.sublime-menu"}}
感謝評論的小夥伴們,祝大家新年快樂啦!

python學習筆記(2)--sublimeText3運行python

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.