3

I have read numerous articles about running code in the Atom code editor, however, I cannot seem to understand how this can be done. Could anyone explain it in simpler terms?

I want to run my Python code in it and I have downloaded the 'python-tools-0.6.5' and 'atom-script-2.29.0' files from the Atom website and I just need to know how to get them working.

unor
  • 92,415
  • 26
  • 211
  • 360
TOPCOD3R
  • 226
  • 1
  • 3
  • 11

3 Answers3

6

enter image description here

From Atom > Preferences > Install:

Search for atom-runner package and install it.

After you have installed the package atom-runner on Atom;

Create a new document and copy&paste your code to new document and save the document with .py extension. For example myfile.py

Last step execute the atom-runner using this shortcut:

Hit Ctrl+R (Alt+R on Win/Linux) to launch the runner for the active window.

enter image description here

mertyildiran
  • 6,477
  • 5
  • 32
  • 55
2

If you'd like a package that supports user input too, consider script-runner. It's very similar but uses a proper terminal for executing the task.

ioquatix
  • 1,411
  • 17
  • 32
0

From Atom > Preferences > Install:

Search for atom-runner package and install it.

Close the atom editor and reopen. This helps the atom editor set the right path and will solve the issue.

If this doesnt help, manually copy the folder of the python installation directory and add the path to system PATH. This will solve the issue.