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 слични објави

Пребарај: #dopingpongarchives

当前筛选 #dopingpongarchives清除筛选
dopingpong

@dopingram · Post #4117 · 14.07.2025 г., 08:18

Happy Birthday, Petite Meller! A fragment of the press realise an unrealized joint project. Petite Philosophia X Doping Pong Petite Philosophia will be released later as the world's first perfume that conveys the beautiful scent of philosophy from ancient Greece to the psychoanalysis room. Super singer Petite Meller and brilliant artists group Doping Pong came together in an international project to create the world’s first perfume with the scent of philosophy. Meller explains that the origin of the project came from wanting to create a perfume with the scent of philosophy. According to Meller “In Greek Philo is The Love, Sophia is Wisdom. I asked Russian art-collective Doping Pong to design the book shaped perfume with philosophy written in Russian letters to represent their art collaboration”. Doping Pong art group are the pioneers of digital art in Russia that was founded in 1997 in St. Petersburg. Now, they are apologists for traditional painting. In the past, Doping Pong collaborated with Richardson and Supreme, participated in the collective exhibition "New Classics" - curated by Sasha Bogoev, editor of Juxtapoz magazine and held their retrospective "Doping Pong: Our everything!" at the Erarta Museum of Contemporary Art. Petite Meller is a French Israeli artist and songwriter who brings a philosophical view on life through her music. "Lil Empire" is her debut album with her hit "Baby Love". Her Jazzy pop videos conceals "jouissance" which is in Freud’s terms a pleasure out of pain. Aside from her musical career, Meller received a postgraduate degree in philosophy from the Sorbonne in Paris. For more information on Petite Philosophia, visit Instagram Petite Meller: www.instagram.com/petitemeller #petitemeller#философия#perfume#dopingpong#digitalart#dopingpongarchives