I'm new to terminal, and am just following a beginners python course, I've saved an "example.py" file and im trying to open it but get this error?
also where it says "pc-79-59" that used to say the name of my MacBook as found in systems > sharing, but now it doesn't?
1 Answer
mq1998:
example.py is a file. If you want to edit a file you need a text editor like nano, vim, etc.
- First, check if you have installed one of these. If you don't have installed a text editor, install with your package manager. For example, in ubuntu/debian you can install:
apt-get update
apt-get install packageName- To open a file, use the name of the text editor and the filename:
nano example.pyor
vim example.pyetc.
- Finally, to execute your python program:
python example.pyAnd if the version you're using is python3, then:
python3 example.pyCheck if you have installed the python interpreter.
1