Python Scripting - MacOS, Linux and Unix

Опубликовано: 14 Ноябрь 2023
на канале: 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


Смотрите видео Python Scripting - MacOS, Linux and Unix онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Alexander Farrell 14 Ноябрь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 39 раз и оно понравилось 3 людям.