Trying to learn how to run my scripts through Ubuntu's terminal regularly. That being said I am familiar with bash, wget, and awk being called but how do I call python files to run in the terminal? I would like to learn this but I am unsure on where to research it. I have a .pyw file that references several .py files in a folder.
Tell me more
×
Ask Ubuntu is a question and answer site for
Ubuntu users and developers. It's 100% free, no registration required.
|
|
|||
|
|
|
Just prefix the script's filename with i.e.:
|
|||
|
|
|
OR Make sure the first line of your file has Make it executable - And run it as |
|||
|
|
pyw should run in the same manner, I think. You can also start an interactive console with just
Also, you can avoid having to invoke python explicitly by adding a shebang at the top of the script:
... or any number of variations thereof |
|||
|
|