@trading_pit_signal · Post #34124 · 08.02.2024 г., 14:42
Remember to share team keep motivating. #Screenshot those Blue blizzards we going for more TP's MORE FEEDBACK MORE SIGNALS
Hashtags
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #198 · 6 јан.
Первая директория в sys.path 🔸 Когда вы запускаете Python-интерпретатор в интерактивном режиме, в системные пути (sys.path) в самое начало добавляется текущая рабочая директория >>> for path in sys.path: ... print(f'"{path}"') "" "/usr/lib/python37.zip" "/usr/lib/python3.7" ... Первая строка пустая, что и означает текущую рабочую директорию. 🔸 Если вы запускаете интерпретатор передавая скрипт как аргумент, то история получается иная. На первом месте будет директория в которой располагается скрипт. А текущая рабочая директория игнорируется. Пишем скрипт с таким содержанием: # script.py import sys for path in sys.path: print(f'"{path}"') Запускаем python3 /home/user/dev/script.py Получаем "/home/user/dev" "/usr/lib/python37.zip" "/usr/lib/python3.7" ... 🔸 Если вы запускаете скрипт по имени модуля то на первом месте будет домашняя директория текущего юзера python3 -m script "/home/user" "/usr/lib/python37.zip" "/usr/lib/python3.7" ... Скрипт должен быть доступен для импорта На что это влияет? На видимость модулей для импорта. Если вы ждёте, что, запустив скрипт по пути, сможете импортировать модули из текущей рабочей директории, то вы ошибаетесь. Придётся добавлять путь os.getcwd() в sys.path самостоятельно или заранее объявлять переменную PYTHONPATH. #basic
Hashtags
Пребарај: #screenshot
@trading_pit_signal · Post #34124 · 08.02.2024 г., 14:42
Remember to share team keep motivating. #Screenshot those Blue blizzards we going for more TP's MORE FEEDBACK MORE SIGNALS
Hashtags
@trading_pit_signal · Post #33919 · 06.02.2024 г., 07:21
Remember to share FEEDBACK team keep motivating. #Screenshot those Blue blizzards we going for more TP's MORE FEEDBACK MORE SIGNALS
Hashtags
@trading_pit_signal · Post #33602 · 31.01.2024 г., 14:14
You can see gold🔥 and currency pairs 🔥 This is how it's done guys. #Screenshot your profit and send to admin. Click on the pinned message and contact admin
Hashtags
@trading_pit_signal · Post #33601 · 31.01.2024 г., 14:14
You can see gold🔥 and currency pairs 🔥 This is how it's done guys. #Screenshot your profit and send to admin. Click on the pinned message and contact admin
Hashtags
@trading_pit_signal · Post #33599 · 31.01.2024 г., 14:13
You can see gold🔥 and currency pairs 🔥 This is how it's done guys. #Screenshot your profit and send to admin. Click on the pinned message and contact admin
Hashtags
@trading_pit_signal · Post #33598 · 31.01.2024 г., 14:07
Remember to share FEEDBACK team keep motivating. #Screenshot those Blue blizzards we going for more TP's MORE FEEDBACK MORE SIGNALS
Hashtags
@trading_pit_signal · Post #33552 · 31.01.2024 г., 08:59
You can see gold🔥 and currency pairs 🔥 This is how it's done guys. #Screenshot your profit and send to admin. Click on the pinned message and contact admin
Hashtags
@trading_pit_signal · Post #33550 · 31.01.2024 г., 08:56
You can see gold🔥 and currency pairs 🔥 This is how it's done guys. #Screenshot your profit and send to admin. Click on the pinned message and contact admin
Hashtags
@trading_pit_signal · Post #33537 · 31.01.2024 г., 07:38
Remember to share FEEDBACK team keep motivating. #Screenshot those Blue blizzards we going for more TP's MORE FEEDBACK MORE SIGNALS
Hashtags
@trading_pit_signal · Post #33493 · 30.01.2024 г., 12:53
You can see gold🔥 and currency pairs 🔥 This is how it's done guys. #Screenshot your profit and send to admin. Click on the pinned message and contact admin
Hashtags
@trading_pit_signal · Post #33491 · 30.01.2024 г., 12:52
You can see gold🔥 and currency pairs 🔥 This is how it's done guys. #Screenshot your profit and send to admin. Click on the pinned message and contact admin
Hashtags
@trading_pit_signal · Post #33487 · 30.01.2024 г., 12:45
Remember to share team keep motivating. #Screenshot those Blue blizzards we going for more TP's MORE FEEDBACK MORE SIGNALS
Hashtags