Running Python from Atom

PythonAtom Editor

Python Problem Overview


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?

Python Solutions


Solution 1 - Python

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.

Solution 2 - Python

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

Solution 3 - Python

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)

Solution 4 - Python

Yes, you can do it by:

-- Install Atom

-- Install Python on your system. Atom requires the latest version of Python (currently 3.8.5). Note that Anaconda sometimes may not have this version, and depending on how you installed it, it may not have been added to the PATH. Install Python via https://www.python.org/ and make sure to check the option of "Add to PATH"

-- Install "scripts" on Atom via "Install packages"

-- Install any other autocomplete package like Kite on Atom if you want that feature.

-- Run it

I tried the normal way (I had Python installed via Anaconda) but Atom did not detect it & gave me an error when I tried to run Python. This is the way around it.

Solution 5 - Python

Follow the steps:

  1. Install Python
  2. Install Atom
  3. Install and configure Atom package for Python
  4. Install and configure Python Linter
  5. Install Script Package in Atom
  6. Download and install Syntax Highlighter for Python
  7. Install Version control package Run Python file

More details for each step Click Here

Solution 6 - Python

There is a package called "platformio-ide-terminal" that allows you to run Atom code with Ctrl + Shift + B". That's the only package you need (Windows).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionpyCthonView Question on Stackoverflow
Solution 1 - PythonnwinklerView Answer on Stackoverflow
Solution 2 - Pythonkarthik GView Answer on Stackoverflow
Solution 3 - PythonAnirudh MaheswaramView Answer on Stackoverflow
Solution 4 - PythonArti AgarwalView Answer on Stackoverflow
Solution 5 - PythonShahid SiddiqueView Answer on Stackoverflow
Solution 6 - PythonMichaelView Answer on Stackoverflow