Мы уже знаем, что на текущую сессию интерпретатора изменение 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
🔥NEW RELEASE🔥
😁P.E.D. Footlock system: Leg locks on Steroids by Dima Murovanni😁
➡️Unlock the full potential of your leg lock game with the P.E.D. Footlock System, a groundbreaking instructional by B-Team's own Dima Murovanni.
➡️Dima breaks down why the straight footlock should be the foundation of your leg lock system—showing how its mechanics, control positions, and finishing pathways translate into heel hooks, kneebars, inside sankaku, and more..
̶$̶1̶2̶7̶😍$14.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
🌈UFC Picks
👑MasterClass
✈️@bjjfanaticsinstructionals
#DimaMurovanni#Leglocks#NoGi#BTeam
💁♀️Buy
💁♀️
😁Samurai Foot Sweeps & Leg Trips By Kenta Iwamoto😁
➡️Unlock the ancient foot-sweeping secrets of Japan’s samurai-era martial arts, updated for the modern mats.
➡️These are not just traditional techniques – they are refined, competition-tested entries, setups, and finishes that blend seamlessly with modern BJJ and no-gi grappling. Whether you’re looking to score in IBJJF rulesets or develop a takedown game that feels effortless, Kenta delivers the details that make the difference.
➡️In Samurai Foot Sweeps &Leg Trips, Kenta Iwamoto – a judo black belt and high-level BJJ competitor – pulls back the curtain on a hidden arsenal of off-balancing attacks that have been quietly dominating in Japan for generations.
$99😍$9.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
🌈UFC Picks
👑MasterClass
✈️@bjjfanaticsinstructionals
#KentaIwamoto#Takedowns#NoGi#BTeam
💁♀️Buy
💁♀️
🔥NEW RELEASE🔥
😁Octopus Guard 2.0 by Craig Jones😁
➡️In this updated course, Craig Jones refines the original framework with cleaner entries, stronger off-balancing, and smoother transitions to the back, legs, and top position
➡️Built specifically for modern no-gi grappling, this system thrives against aggressive passers who want to stay on their feet and smash forward.
$197😍$19.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
👑MasterClass
✈️@bjjfanaticsinstructionals
#CraigJones#Guard#NoGi#BTeam
💁♀️Buy
💁♀️
😁The White Monster Method by Declan Moody😁
➡️Discover a brutal, pressure-based passing system that forces your opponents into discomfort and drains their energy.
➡️In The White Monster Method, BJJ competitor Declan Moody teaches his signature north-south passing approach — built around control, weight distribution, and calculated movement that makes your opponents carry your body and burn out fast.
$79😍$9.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
🌈UFC Picks
👑MasterClass
✈️@bjjfanaticsinstructionals
#DeclanMoody#Passing#NoGi#BTeam
💁♀️Buy
💁♀️
😁Ninja Escapes by Kenta Iwamoto😁
➡️Unlock the secrets to flawless back escapes and turtle escapes with Ninja Escapes by Kenta Iwamoto — a masterful Brazilian Jiu-Jitsu instructional series designed to elevate your defensive game
➡️Whether you find yourself trapped in a tight back control or stuck in the turtle position, this detailed program breaks down escape techniques with precision and clarity.
̶$̶7̶9̶😍$9.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
🌈UFC Picks
👑MasterClass
✈️@bjjfanaticsinstructionals
#KentaIwamoto#Escapes#NoGi#BTeam
💁♀️Buy
💁♀️
🔥NEW RELEASE🔥
😁Under the Legs Passing Anthology by Lachlan Giles😁
➡️Master The Most Battle-Tested Guard Passing System For Beating Modern Guards – Including K-Guard, Inversions, & Leg Lock Hunters – With Lachlan Giles’ Step-By-Step Under-The-Legs Passing Blueprint
➡️This anthology breaks down every major variation of under-the-legs passing – including the double under, over-under, single under, and single under with knee pin – and shows you how to blend them together into a cohesive, unstoppable passing game.
$197😍$19.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
👑MasterClass
✈️@bjjfanaticsinstructionals
#LachlanGiles#Passing#Gi#BTeam
💁♀️Buy
💁♀️
👨💻The Nicky Ryan Blueprint
Content now available ⚠️
Updating as he releases new content
Nicky Ryan - The Nicky Ryan Blueprint
🚟
🚟
🚟
🚟
🚟
🚟
🚟
🚟
🚟
🚟
💬BjjFanatics Instructionals
Remember to always recommend the channel ✅
#NickyRyan#NoGi#Technique#BTeam#CraigJones