1

I want to run a python script within Atom text editor on OSX.

I have installed the package atom-python-run to do that.

However in Packages menù I cannot find the package and right clicking on the file name I cannot find any useful option.

In the official page there is written to press F5 or F6 to run the script but doing that tries to compile the script with the gpp package (which I had installed before) as if it were C/C++ code.

NOTE: An alternative is given by the scripts package which runs/compiles scripts according to the file name but I would like to use atom-python-run.

2
  • 1
    I'm getting some strange behavior with atom-python-run as well. The package is loaded and is designated under packages as python-runner. But selecting that never works. Clicking on F5 does work most of the time but not always. I have the script module loaded as well. That seems to work all the time with cmnd-I key combo. If I open a script and f5 doesn't work, I use cmnd-I and after doing that, f5 appears to work ok. I'm still trying to determine why f5 doesn't always work. Commented Jun 8, 2018 at 20:18
  • After working with Atom for about an hour, playing with F5 and Script, I quit and closed Atom still unsure why F5 didn't always work. I was doing something else which required me to open a terminal window. When I did this, the window went crazy opening tabs and plot windows all related to my Atom testing. There must have been 50 or more tabs and plots. I closed them all down and reopened Terminal to ensure I got them all. After doing that I reopened Atom and F5 and F6 worked fine. So try opening a terminal window to be sure you don't have a similar problem. Commented Jun 10, 2018 at 17:30

1 Answer 1

1

You should be able to find the package by going Settings -> Packages -> (search) atom python run

As for keybindings, use the keybinding resolver (cmd-.) to see what is happening. It sounds like there is a conflict, which can be resolved by disabling the gpp-compiler package keybindings, or specifying it yourself in the keymap.cson file.

I tried running a python script with atom-python-run just now, and it did make a terminal window appear. The window was hidden by default though. The package also can't handle file paths with spaces in them, so be mindful of that.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.