Первая директория в 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
🚩🚀#Garena Free Fire OB52 | ❄️January 1️⃣4️⃣, 2026
📍⛩Jujutsu Kaisen Collab NEW!!✨
🎮🕹Download #FF OB52 Update On Jan 14!!
🗓⏳The Countdown Is Almost Over!!! 1️⃣ Day Left To OB52 Update Official Release!!!⏰⏰⏰
🔥🔥🔥Event Period: From【 Jan 14 】to【 Feb 13 】
Gear up and get ready for a cursed-energy surging battle!👊⚔️ Play as a true sorcerer and perform iconic techniques on the battlefield like a game master! 🏆🔥
🧐Free Fire OB52 Update Full Patch Notes
📌We'll let you know if there are any more new updates to FF via this channel, so stay tuned!
Add @APKFreeDownloader_Bot to get any apk you want.
🚩🚩Free Fire OB50 | #FF Schedule Leaks
⌛️🚀#Garena Free Fire OB50 Advance Server
Goes Live July 6, 9AM (IST)!🔥🔥🔥
⏰📅Free Fire #OB50 Official Game
Expected to Release on July 31!🔥🔥🔥
👀 Mark your calendar and keep an eye out for the official release date! We will upload the 🎮latest version of Free Fire Advance Server APK once it is ready. OB50 details, click to check out: 🔍Everything you need to know about the upcoming OB50
We'll bring you more Garena news as soon as it becomes available, stay tuned!
Add @APKFreeDownloader_Bot to get any apk you want.
💳💳💳💳💳💳💳💳💳💳💳
⚠️👾👾👾👾👾
⚠️
🔡🅰️🔡🔡🔡🔡🅰️
✍️✍️✍️✍️✍️✍️✍️✍️
✍️✍️✍️✍️✍️✍️✍️✍️✍️✍️
Adquiera una tarjeta digital prepagada VISA Vanilla y hágase con un método de pago versátil y sencillo de utilizar en cualquier plataforma donde se acepte Visa 💳
Precios en USD
✏️
✏️➡️💲3️⃣3️⃣
✏️
✏️➡️💲6️⃣5️⃣
✏️
✏️
✏️➡️💲1️⃣2️⃣6️⃣
‼️🇨🇺 SERVICIO PARA
TODA #CUBA🇨🇺‼️
Con nosotros podrá tener acceso a esas opciones de pago online que siempre quiso pero no tenía ni idea de que podía hacerlo desde Cuba
Acceso a características Premium en aplicaciones de Diseño y Edición, suscripciones a almacenamiento en la nube, números extranjeros de teléfono virtuales, VPN en cualquier ubicación del mundo, software de producción de audio e imagen, desarrollo web, coding, etc
¡Libros, televisión y música online, videojuegos!
Podemos hacerle llegar suscripciones, códigos y tarjetas digitales de saldo a sus cuentas en...
🛒#Amazon#Prime
📱#Apple#iTunes
🎮#Battlenet (#Blizzard's World of Warcraft #WoW)
ℹ#Dota2
🎮#Garena
🕹#LeagueofLegends
📺#Netflix
🎮#Nintendo
🎮#Origin
🎮#PlayStation Network #PSN
🎮#Riot
🎵#Spotify
🎮#STEAM
💬#Telegram#Premium
📺#Twitch
🎮#Xbox Live
🇨🇺#Remesas#Pagos
📱 Tenemos alternativas para los pagos dentro de la Google Play Store con acceso a Google One y al Play Pass 📱
Contáctenos por #Telegram, por #Google, #Facebook, #Instagram, #Twitter y por #WhatsApp
💬@jcslimcuba
💬https://wa.me/5353717679
🌐https://m.me/jcslimcuba.fb
☎️ +5353717679
🖥https://linktr.ee/jcslimcuba
#saldodesteam#steamwallet#cuba#psn#battlenet#steam#apple#steamgiftcard#jcslimcuba#giftcards#appleitunes#tarjetasderegalo#steamcuba#fortnite#Amazon#amazonmusic#amazonprime#primevideo#promo#visa#vanilla