@zince_general_collection · Post #9442 · 19.04.2026 г., 10:42
しろい: #illustration 260417 https://twitter.com/shiloroshi/status/2045253467577434506
Hashtags
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
Пребарај: #illustration
@zince_general_collection · Post #9442 · 19.04.2026 г., 10:42
しろい: #illustration 260417 https://twitter.com/shiloroshi/status/2045253467577434506
Hashtags
@besteanimebilder · Post #6334 · 04.04.2020 г., 17:01
ひこうき雲 #illustration 4096x1690
Hashtags
@besteanimebilder · Post #6271 · 26.02.2020 г., 20:11
shiro #illustration 10025x5457
Hashtags
@lovehopecollector · Post #1996 · 15.11.2023 г., 09:36
#Illustration Giacomo Bagnara
Hashtags
@lovehopecollector · Post #1784 · 08.10.2023 г., 19:33
#Illustration Form play Animation Studio Love the simplicity and creativity. Source
Hashtags
@lovehopecollector · Post #1632 · 18.09.2023 г., 08:00
#Illustration 余华潦草小狗 Eleven11dream source
Hashtags
@lovehopecollector · Post #1301 · 27.07.2023 г., 17:00
#Illustration Poster for documentary of Sinead O'Connor - Nothing Compares Akiko Stehrenberger “This and many iterations of it, made it to multiple rounds before it was finally unused in the end. However, I'm always happy when I get to step away from the computer. Painted with sumi ink, I then photographed water droplets over the painting. The tears concept references two things: her iconic music video and her many struggles in life that made her such a controversial figure.” RIP🌹🌹🌹
Hashtags
@lovehopecollector · Post #1646 · 21.09.2023 г., 15:15
#Art #Illustration Alex Gamsu Jenkins 好多古怪有趣充满想象力作品… 他还画漫画…好多屎尿屁…好好笑😀 Instagram: alexgamsujenkins
Hashtags
@lovehopecollector · Post #1571 · 06.09.2023 г., 15:19
#Art #Illustration Yoyo Nasty
Hashtags
@lovehopecollector · Post #1175 · 16.07.2023 г., 23:30
#Art #Illustration Guy Billout
Hashtags
@besteanimebilder · Post #6636 · 16.02.2021 г., 10:25
nagame #original#illustration 4724x3024
Hashtags
@besteanimebilder · Post #6612 · 26.11.2020 г., 18:55
きみとつなぐ #original#illustration 1080x1920
Hashtags