@WorldNews · Post #74239 · 19.04.2026 г., 21:19
Carney calls Canada's ties to the U.S. 'weaknesses' that must be corrected | CBC News [Read FullArticle] @WorldNews#CanadaUS#CanadaUSRelations#WorldNews
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
Пребарај: #canadausrelations
@WorldNews · Post #74239 · 19.04.2026 г., 21:19
Carney calls Canada's ties to the U.S. 'weaknesses' that must be corrected | CBC News [Read FullArticle] @WorldNews#CanadaUS#CanadaUSRelations#WorldNews
@WorldNews · Post #74236 · 19.04.2026 г., 17:59
PM Carney declares U.S. ties now a ‘weakness’ in address to Canadians [Read FullArticle] @WorldNews#CanadaUSRelations#USCanada#WorldNews
@CryptoM · Post #64616 · 09.04.2026 г., 11:04
🚀 Hormuz Shipping Crisis Presents Opportunity for Canada to Mend Ties with Trump The ongoing shipping crisis in the Strait of Hormuz has opened a diplomatic window for Canada to improve relations with U.S. President Donald Trump. Bloomberg posted on X that the situation has escalated tensions in the region, affecting global oil supply routes. Canada, with its strategic position and resources, is in a unique position to offer assistance and mediate in the crisis. The Strait of Hormuz is a critical chokepoint for the global oil trade, and recent disruptions have raised concerns over energy security. As a major oil producer, Canada could play a pivotal role in stabilizing the situation by increasing its oil exports to offset potential shortages. Furthermore, this crisis presents an opportunity for Canada to strengthen its diplomatic ties with the United States. By offering support and collaboration, Canada can demonstrate its commitment to regional stability and international cooperation. The Canadian government is reportedly considering various options to address the situation, including diplomatic engagement and increased energy exports. This approach could not only help alleviate the immediate crisis but also pave the way for improved bilateral relations with the U.S. under President Trump's administration. As the situation develops, Canada’s actions could have significant implications for both regional stability and its relationship with the United States. #HormuzCrisis#Shipping#CanadaUSRelations#Diplomacy#OilTrade#EnergySecurity#InternationalRelations#GlobalOilSupply#Geopolitics#TradeRoutes