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

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #201 · 13 јан.

Мы уже знаем, что на текущую сессию интерпретатора изменение PYTHONPATH никак не повлияет. Но если вы запустите дочерний процесс, то он унаследует окружение текущего процесса, а значит и изменения в любых переменных будут на него влиять. Вот небольшой пример: Объявляем переменную user@host:~$ export PYTHONPATH=/path1 Запускаем интерпретатор user@host:~$ python3 Проверим что в sys.path >>> import sys >>> print(sys.path) ['', '/path1', '/usr/lib/...', ...] Добавляем что-то в переменную >>> import os >>> os.emviron['PYTHONPATH'] = '/path1:/path2' >>> print(sys.path) ['', '/path1', '/usr/lib/...', ...] Изменений нет. Но давайте запустим дочерний процесс и посмотрим там >>> os.system('python3') # теперь мы находимся в другом процессе >>> import sys >>> print(sys.path) ['', '/path1', '/path2', '/usr/lib/...', ...] Тоже самое будет и с subprocess, так как по умолчанию текущее окружение тоже наследуется. >>> import subprocess >>> subprocess.call(['python3', '-c', 'import sys;print(sys.path)']) ['', '/path1', '/path2', '/usr/lib/...', ...] ______________________ Лучшей практикой является передача энвайронмента явно через аргумент env! import subprocess subprocess.call(cmd, env={'PYTHONPATH': '...'}) Это поможет точно понимать какое окружение будет у запускаемого процесса и при этом не изменять окружение текущего процесса. #basic

Hashtags

Резултати

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

Пребарај: #pnptc

当前筛选 #pnptc清除筛选
StartupBase

@startupbaseuz · Post #5834 · 17.06.2025 г., 06:19

📣 Open Call: Enterprise & AI Startups — Your Moment Is Now! 🚀 Plug and Play Central Asia, in partnership with IT Park Uzbekistan, is on the lookout for high-potential startups from Central Asia and around the globe to join Batch 5 of Plug and Play Tech Center Accelerator Program in Uzbekistan. Who should apply? ✔️ International startups ready to expand into Central Asia and establish a footprint in Uzbekistan ✔️ Homegrown Uzbekistan-based startups looking to scale fast with world-class support ✔️ High-growth startups with real traction and global ambition What’s in it for you? ✔️ Expert mentorship and hands-on support from Plug and Play's global network ✔️ Investment opportunities and warm intros to VCs ✔️ Exclusive access to pitch at our Expo in front of corporates and investors ✔️ Practical workshops and pitch training sessions ✔️ The chance to join Plug and Play Tech Center GOAL Program in Silicon Valley and visit other locations IT Park Ventures will review all participating startups for investment - supporting international startups considering entering Uzbekistan and helping local founders scale worldwide. Applications are open here:link 🗓 Deadline to apply: July 15, 2025 🟢 Selected startups will be announced in August. The program kicks off in early October. Apply now and let’s build the future together! #PNPTC#PlugAndPlayCA#Uzbekistan#Accelerator#Batch5#OpenCall#ITPark

IT Park Ventures

@ITParkVentures · Post #234 · 17.06.2025 г., 07:24

📣 Open Call: Enterprise & AI Startups — Your Moment Is Now! 🚀 Plug and Play Central Asia, in partnership with IT Park Uzbekistan, is on the lookout for high-potential startups from Central Asia and around the globe to join Batch 5 of Plug and Play Tech Center Accelerator Program in Uzbekistan. Who should apply? ✔️ International startups ready to expand into Central Asia and establish a footprint in Uzbekistan ✔️ Homegrown Uzbekistan-based startups looking to scale fast with world-class support ✔️ High-growth startups with real traction and global ambition What’s in it for you? ✔️ Expert mentorship and hands-on support from Plug and Play's global network ✔️ Investment opportunities and warm intros to VCs ✔️ Exclusive access to pitch at our Expo in front of corporates and investors ✔️ Practical workshops and pitch training sessions ✔️ The chance to join Plug and Play Tech Center GOAL Program in Silicon Valley and visit other locations IT Park Ventures will review all participating startups for investment - supporting international startups considering entering Uzbekistan and helping local founders scale worldwide. Applications are open here:link 🗓 Deadline to apply: July 15, 2025 🟢 Selected startups will be announced in August. The program kicks off in early October. Apply now and let’s build the future together! #PNPTC#PlugAndPlayCA#Uzbekistan#Accelerator#Batch5#OpenCall#ITPark