Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Python from Atom

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?

like image 395
pyCthon Avatar asked Aug 30 '14 18:08

pyCthon


People also ask

Is Atom A good IDE for Python?

Atom is an open-source code editor developed by Github that can be used for Python development (similar Sublime text). Its features are also similar to Sublime Text. Atom is highly customizable. You can install packages as per your need.


3 Answers

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.

like image 186
nwinkler Avatar answered Oct 19 '22 00:10

nwinkler


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

like image 23
karthik G Avatar answered Oct 19 '22 00:10

karthik G


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)

like image 3
Anirudh Maheswaram Avatar answered Oct 19 '22 00:10

Anirudh Maheswaram