0

Open file from Atom.io in Terminal

Hi, so i use the text editor Atom and write really basic codes just playing around & now i want to see if they work in python, however i dont know how to open that file in terminal... Help anyone?

26th Mar 2017, 12:33 PM
Nadia
2 Answers
0
First, you should install Python, e.g. from here: https://www.python.org/downloads/ Then open a command terminal, e.g. press Windows+R, type in cmd, and hit enter. Type "python -V" and see if you get the python version you just installed. Check this post if it doesn't work and python is not in the path: http://pythoncentral.io/add-python-to-path-python-is-not-recognized-as-an-internal-or-external-command/ Navigate to the repository where your python file is located. Alternatively, you can also open a file explorer, navigate to that folder, and start terminal from here (shift + right-click, open terminal here). Next, type python and the name of your file in the command line. See here for a better explanation: http://pythoncentral.io/add-python-to-path-python-is-not-recognized-as-an-internal-or-external-command/
26th Mar 2017, 3:20 PM
lukas bitter
lukas bitter - avatar
0
Okay i followed your steps & this is what comes up: i open terminal and write 'python3 text.py' and this shows up: /Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python: can't open file 'test.py': [Errno 2] No such file or directory & when i drag/drop the file... this shows up: -bash: /Users/nadiahussain/Documents/Programming/Test.py: Permission denied
27th Mar 2017, 12:18 AM
Nadia