Python Scripting - MacOS, Linux and Unix

Pubblicato il: 14 novembre 2023
sul canale di: Alexander Farrell
39
3

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


In questa pagina del sito puoi guardare il video online Python Scripting - MacOS, Linux and Unix della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Alexander Farrell 14 novembre 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 39 volte e gli è piaciuto 3 spettatori. Buona visione!