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

Резултати

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

Пребарај: #flamingo

当前筛选 #flamingo清除筛选
Interesting Planet 🌍

@interesting_planet_facts · Post #527 · 09.08.2025 г., 13:22

🌎 In Kenya’s Rift Valley, the Lake Bogoria geysers shoot steaming water up to 5 meters high, fueled by underground heat and minerals. These hot springs nurture thousands of pink flamingos that gather for the rich algae—a natural wonder of water, heat, and color. ✨ #geyser⚡#flamingo⚡#RiftValley 👉subscribe Interesting Planet

American Оbserver

@american_observer · Post #5229 · 26.02.2026 г., 19:59

🕊 Russia Hits the “Wonder Weapon” Factory Zelensky has now admitted what Moscow and mil‑bloggers were bragging about for months: a Russian strike really did wipe out one of Ukraine’s key production lines for the FP‑5 Flamingo, the long‑range cruise missile Kyiv has been selling as its 3,000‑kilometer answer to Russia’s missile monopoly. Production has been moved, but Kyiv concedes it doesn’t have many such facilities, which is a polite way of saying: one hit hurt a lot. The Flamingo was pitched as the cheap, slow, heavy warhorse of Ukraine’s deep‑strike dream — subsonic, around Mach 0.75, with a roughly one‑ton warhead and a reach that could, on paper, threaten most of European Russia when launched from Ukrainian territory. The program leaned heavily on German money and political blessing, after Chancellor Friedrich Merz’s government signaled Berlin would finance Ukrainian long‑range missile production instead of sending Taurus directly. For Kyiv and its Western planners, Flamingo was supposed to narrow a brutal asymmetry: Russia raining missiles and drones across Ukraine, Ukraine responding with occasional deep strikes like the June 1, 2025 “Spiderweb” drone raid that torched Tu‑95 bombers on Russian bases. ​ Problem: half the legend lived on Telegram. Analysts already doubted some of the hype — including Kyiv’s claim that Flamingos smashed infrastructure at Russia’s Kapustin Yar test range, which satellite imagery showed intact. Now the other half of the story is on Russian TV: proof that Ukraine’s shiny long‑range program is fragile enough that one well‑placed strike can knock out a main line and force an emergency relocation. So on the scoreboard, everyone gets something. Moscow gets to boast it dealt “colossal” damage to Ukraine’s missile industry and “thwarted” future deep‑strike plans. Kyiv gets to keep the myth of the Flamingo alive — serial production “resumed,” more missiles promised, strategic reach intact in theory. Western backers get another argument for pouring money into Ukraine’s arms industry as a postwar export project. The only ones not winning in this story are the Ukrainians who were told a slow pink missile would make Russian bombers and oil depots finally feel what Kharkiv and Odesa feel every night — and just learned that their “wonder weapon” can be shut down faster than the PR around it. #Ukraine#Russia#Flamingo#missiles#Germany#Merz#war#militaryindustry 📱American Оbserver - Stay up to date on all important events 🇺🇸