How to Run python code in Atom?


#1

Hello,

I would like to know how I can run Python 3 code in Atom. I currently have the script package installed, but I do not think it runs python 3 code.

Also, how can I get a shell terminal when I run the code

PS: I am on Mac

Thank you!


#2

It can’t do it alone, but it can if you have Python 3 installed. Do you?

Also, how can I get a shell terminal when I run the code

That is not what the script package is designed to do. If you want a terminal, you should use a package designed to give you one, like termination, atom-domterm, or term; or you could use a package that makes it easy to execute a command line instruction to spawn a terminal, like process-palette.


#3

I have Python 3 installed but I do not know how to run the program. I am on Windows 7.


#4

What program are you trying to run?


#5

The Python 3 program I made


#6

If you don’t know what command to type in a terminal, that’s not an Atom issue. You should look up how to run a python program at the command line.

If you want to run it in Atom, I suggest you learn how to run it in a terminal, then look at the process-palette package like was suggested. It will work.


#7

There are a bunch of packages that you can use. I mentioned some of them at the top of this thread, and if you search the forum for “run python”, you’ll find more. None of them are more powerful and flexible than process-palette, which can be configured either to run your script, or to run your script in a separate terminal window (which gives you full access to command line input features, in case you need them).

If you want to avoid having to think about CLI stuff at all, you can use script, but I don’t advise avoiding the CLI stuff. It’s valuable to have that skill, especially in Python.