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

Резултати

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

Пребарај: #iranusnegotiations

当前筛选 #iranusnegotiations清除筛选
Crypto M - Crypto News

@CryptoM · Post #65135 · 11.04.2026 г., 10:24

🚀 Iran-US Negotiations Progress Slower Than Anticipated According to NS3.AI, a Pakistani government official has indicated that the ongoing negotiations between Iran and the United States are progressing at a slower pace than initially expected. The official noted that while the U.S. side seems eager to achieve specific objectives, Iran is taking a more measured approach and is not rushing to reach a conclusion. #IranUSNegotiations#SlowerProgress#USIranTalks#Diplomacy#NegotiationChallenges#Iran#UnitedStates#PakistaniOfficial

Crypto M - Crypto News

@CryptoM · Post #64997 · 10.04.2026 г., 13:15

🚀 Polymarket Odds for Strait of Hormuz Normalization Drop The probability of the Strait of Hormuz returning to normal by May 31 has significantly decreased on Polymarket, with a 6% drop in one hour and a 12% decline over 24 hours. According to Odaily, the event contract stipulates that if the International Monetary Fund's Portwatch reports a seven-day moving average of ship arrivals at the Strait of Hormuz equal to or above 60 on any date from market creation until May 31, 2026, the market will resolve as 'yes'; otherwise, it will resolve as 'no'. The daily count includes container ships, bulk carriers, roll-on/roll-off ships, general cargo ships, and tankers, excluding those not reported by the IMF Portwatch. Pakistani media confirmed today that an Iranian delegation has arrived for negotiations, with major talks between Iran and the United States scheduled for tomorrow. The discussions in Pakistan will focus on reopening the Strait of Hormuz and extending the ceasefire. Additionally, the U.S. delegation participating in the talks has departed for Islamabad, Pakistan, with U.S. Vice President Vance already on board. Before departure, Vance expressed anticipation for the negotiations on the Iran issue, stating that U.S. President Donald Trump has provided 'quite clear guidelines' for the talks. #StraitOfHormuz#Polymarket#IranUSNegotiations#MaritimeTrade#Geopolitics#Ceasefire#ShipTraffic#IMFPortwatch#Pakistan#USPolitics

Crypto M - Crypto News

@CryptoM · Post #65330 · 12.04.2026 г., 23:28

🚀 Japanese Companies Face Challenges Amid Rising Oil Prices Japanese companies are entering the earnings season with a pessimistic outlook as crude oil prices surge following the unsuccessful U.S. peace talks with Iran. Bloomberg posted on X, highlighting the impact of geopolitical tensions on the global oil market. The failure of negotiations has led to increased uncertainty, affecting various sectors in Japan that rely heavily on energy imports. As oil prices climb, businesses are bracing for higher operational costs, which could impact their profitability in the coming months. The situation underscores the interconnectedness of global events and their influence on national economies. #JapaneseCompanies#OilPrices#GeopoliticalTensions#EnergyImports#OperationalCosts#Profitability#GlobalEconomy#EarningsSeason#Bloomberg#IranUSNegotiations