TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

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

Резултати

Пронајдени 2 слични објави

Пребарај: #azerbaijanstartups

当前筛选 #azerbaijanstartups清除筛选
StartupBase

@startupbaseuz · Post #6336 · 06.11.2025 г., 10:21

🇦🇿 Ozarbayjonda Best Startup Project yarim final bosqichi bo‘lib o‘tdi! “Digital Startup Awards” (DSA) butun mintaqa bo‘ylab eng iqtidorli startap asoschilarini birlashtirishda davom etmoqda. 🌟 Dunyo bo‘ylab kelib tushgan 350 dan ortiq ariza orasidan 20 ta ozarbayjonlik startap o‘z innovatsion g‘oyalarini taqdim etdi. Natijada ikki finalchi — “Starkids” va “Tryverse” — joriy yil dekabr oyida Toshkentda bo‘lib o‘tadigan Grand Final bosqichiga yo‘llanma oldi. 🚀 Jarayon tobora qizg‘in tus olmoqda — yakuniy bosqichga yaqinlashar ekanmiz, yangiliklarni kuzatishda davom eting! 📖To‘liq maqolani o'qing: startupbase.uz — 🇦🇿Azerbaijan Hosts Its Best Startup Project Semifinal! The Digital Startup Awards (DSA) continues to bring together the brightest founders from across the region. 🌟 Out of 350+ applications globally, 20 startups from Azerbaijan took the stage to pitch their innovative ideas — and two finalists, Starkids and Tryverse, have earned their spot in the Grand Final in Tashkent this December. 🚀 The momentum is growing — stay tuned as we move closer to the final showdown! 📖Read the full article here: startupbase.uz #DSA#BestStartupProject#ITParkUzbekistan#AzerbaijanStartups#CentralAsiaStartups

IT Park Ventures

@ITParkVentures · Post #495 · 06.11.2025 г., 11:30

🇦🇿 Ozarbayjonda Best Startup Project yarim final bosqichi bo‘lib o‘tdi! “Digital Startup Awards” (DSA) butun mintaqa bo‘ylab eng iqtidorli startap asoschilarini birlashtirishda davom etmoqda. 🌟 Dunyo bo‘ylab kelib tushgan 350 dan ortiq ariza orasidan 20 ta ozarbayjonlik startap o‘z innovatsion g‘oyalarini taqdim etdi. Natijada ikki finalchi — “Starkids” va “Tryverse” — joriy yil dekabr oyida Toshkentda bo‘lib o‘tadigan Grand Final bosqichiga yo‘llanma oldi. 🚀 Jarayon tobora qizg‘in tus olmoqda — yakuniy bosqichga yaqinlashar ekanmiz, yangiliklarni kuzatishda davom eting! 📖To‘liq maqolani o'qing: startupbase.uz — 🇦🇿Azerbaijan Hosts Its Best Startup Project Semifinal! The Digital Startup Awards (DSA) continues to bring together the brightest founders from across the region. 🌟 Out of 350+ applications globally, 20 startups from Azerbaijan took the stage to pitch their innovative ideas — and two finalists, Starkids and Tryverse, have earned their spot in the Grand Final in Tashkent this December. 🚀 The momentum is growing — stay tuned as we move closer to the final showdown! 📖Read the full article here: startupbase.uz #DSA#BestStartupProject#ITParkUzbekistan#AzerbaijanStartups#CentralAsiaStartups