Running Python from Atom

…衆ロ難τιáo~ 提交于 2019-11-27 05:34:37

问题


In Sublime, we have an easy and convent way to run Python or almost any language for that matter using + b (or ctrl + b)

Where the code will run in a small window below the source code and can easily be closed with the escape key when no longer needed.

Is there a way to replicate this functionally with Github's atom editor?


回答1:


The script package does exactly what you're looking for: https://atom.io/packages/script

The package's documentation also contains the key mappings, which you can easily customize.




回答2:


Download and Install package here: https://atom.io/packages/script

To execute the python command in atom use the below shortcuts:

For Windows/Linux, it's SHIFT + Ctrl + B OR Ctrl + SHIFT + B

If you're on Mac, press ⌘ + I




回答3:


To run the python file on mac.

  1. Open the preferences in atom ide. To open the preferences press 'command + . ' ( ⌘ + , )
  2. Click on the install in the preferences to install packages.

  3. Search for package "script" and click on install

  4. Now open the python file(with .py extension ) you want to run and press 'control + r ' (^ + r)



来源:https://stackoverflow.com/questions/25585500/running-python-from-atom

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!