Первая директория в 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
#MANA/USDT analysis :
#MANA is currently in a correction phase. It is advisable to wait for the price to test the support zone before considering a long entry. With bullish momentum expected to continue, the price is likely to revisit previous highs.
TF : 1W
Entry : $0.4158
Target : $0.8556
SL : $0.3117
#MANA/USDT analysis :
#MANA is currently forming lower lows (LLs) and lower highs (LHs) while trading near the resistance zone. The price is expected to decline from this level and test previous lows. For a short entry, it is advisable to wait for a break below the $0.3370 level.
TF : 1D
Entry : $0.3370
Target : $0.2713
SL : $0.3752
#MANA is currently trading around $0.2843, testing a critical support zone ($0.25 - $0.28).This level previously acted as a strong demand zone in September 2024 before the major uptrend.🔥✅
Further,MANA is testing a critical support zone ($0.25 - $0.28). If buyers hold this level, we could see a bounce toward $0.35 - $0.38. However, a breakdown below $0.25 could lead to a further drop toward $0.20 - $0.22 .🔥✅😍👀✅🔥
#MANA has tested the SR zones and formed upside liquidity. It is forming a correction/HL till golden ratio and took small correction.🔥✅
Further, MANA have potential to go for 500% profit in ALT season .🔥✅😍👀✅🔥😳
💰#MANA has a rising wedge pattern on 6H Time frame,we expect another bullish leg from the Green zone,send it to the next level 🚀
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️