Running Python Files
Okay, so now you have two files in your
pb_terminal/ folder. One is the
hello_terminal one, and then you showed me how to use
cat to put some content into a file, and this one we called
And what you put in there were one
print() function in each file. So since it’s Python code, you should also be able to run it, right? Yes.
So to run Python from the terminal, you typically will just type
python and then the name of the file you want to run. Depending a little bit on how things are set up, you may want to run
python3 instead, but you can usually now just set things up so that when you run
python, it runs the Python 3 that you want to run. But I can just show here, I could also do this. Perfect.
Okay, so, and if you’re running
python hello_cat.py, you will run the
hello_cat file. Exactly.
Become a Member to join the conversation.