Cheat Sheet:
1. Write Python
2. Shebang (#! python3)
3. Make executable (chmod +x whatever.py)
4. Move to $PATH folder, or add folder to PATH
Alternatively, you can set up aliases in your shell instead of adding to a folder in $PATH.
If you have trouble with the shebang, run whereis python3 to detect where python is installed on your machine.
Documentation on OS Module:
https://docs.python.org/3/library/os....
Documentation on SYS Module:
https://docs.python.org/3/library/sys...
Timestamps
00:00 Demonstration
00:42 Create a Python Script
01:45 Add a shebang
02:12 Optional: Remove file extension
02:32 Make executable with chmod
03:20 Test
03:34 Command line arguments with sys module
05:25 Path variable
09:04 Other languages with the shebang
09:18 OS Module in Python
11:56 Thank you
Auf dieser Seite können Sie das Online-Video Python Scripting - MacOS, Linux and Unix mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Alexander Farrell 14 November 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 39 Mal angesehen und es wurde von 3 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!