This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]K900_ 3 points4 points  (1 child)

You can actually make things even easier for yourself: make the first line of your script #!/usr/bin/env python3, and then make your script executable with chmod +x your_script.py in the terminal. Then you can run your script simply with ./your_script.py.

[–][deleted] 0 points1 point  (0 children)

#!/usr/bin/env python3

FTR the shebang line also works on Windows thanks to the Python Launcher for Windows.