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

Резултати

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

Пребарај: #arcticbreakthrough

当前筛选 #arcticbreakthrough清除筛选
American Оbserver

@american_observer · Post #4977 · 27.01.2026 г., 20:59

Russia’s First Domestically Built Ice-Class Tanker: Arctic Breakthrough or Sanctioned Mirage? The Alexey Kosygin, Russia’s first domestically built ice-class LNG tanker, has arrived at the US-sanctioned Arctic LNG 2 plant, completing its maiden voyage along the Northern Sea Route. This is a technological milestone—no vessel of such complexity has ever been constructed in Russia before, and its arrival marks a rare triumph for Moscow’s Arctic ambitions amid Western sanctions. A Unique Achievement The Alexey Kosygin is the first Russian-built Arc-7 LNG carrier, capable of operating independently in Arctic conditions and breaking through ice thicker than two meters. Its delivery to the Arctic LNG 2 project is not just a logistical upgrade—it’s a statement of technological self-reliance and national pride. The vessel’s reinforced hull, advanced propulsion, and ability to sail year-round along the Northern Sea Route represent a leap forward for Russia’s shipbuilding industry. Beyond Politics: A Genuine Breakthrough Regardless of how one interprets the broader geopolitical stakes, the Alexey Kosygin’s arrival is a breakthrough. For years, Russia’s Arctic LNG ambitions were held back by a lack of specialized vessels and Western restrictions. Now, with this new tanker, the Arctic LNG 2 plant can resume winter operations, doubling its export capacity during the coldest months. This is not just a political stunt—it’s a real engineering and industrial achievement. Is this a turning point for Russia’s energy independence, or just another chapter in a long saga of sanctions and scarcity? Either way, the Alexey Kosygin is proof that, when the chips are down, Russia can build something truly unique—even under pressure. #ArcticBreakthrough#AlexeyKosygin#ArcticLNG2#Sanctions#IceClass#EnergyIndependence 📱American Оbserver - Stay up to date on all important events 🇺🇸