@AiArtsGalleryAnime · Post #6227 · 28.04.2026 г., 06:17
Serene AI Moments ☁️ Calm and beautiful anime art created with artificial intelligence. #AnimeAesthetic#Serene#AiArt#CalmAnime#DigitalPainting#AI
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
Пребарај: #calmanime
@AiArtsGalleryAnime · Post #6227 · 28.04.2026 г., 06:17
Serene AI Moments ☁️ Calm and beautiful anime art created with artificial intelligence. #AnimeAesthetic#Serene#AiArt#CalmAnime#DigitalPainting#AI
@AiArtsGalleryAnime · Post #6203 · 22.04.2026 г., 06:16
Serene AI Moments ☁️ Calm and beautiful anime art created with artificial intelligence. #AnimeAesthetic#Serene#AiArt#CalmAnime#DigitalPainting#AI
@AiArtsGalleryAnime · Post #6179 · 16.04.2026 г., 06:12
Serene AI Moments ☁️ Calm and beautiful anime art created with artificial intelligence. #AnimeAesthetic#Serene#AiArt#CalmAnime#DigitalPainting#AI
@AiArtsGalleryAnime · Post #6155 · 10.04.2026 г., 06:24
Serene AI Moments ☁️ Calm and beautiful anime art created with artificial intelligence. #AnimeAesthetic#Serene#AiArt#CalmAnime#DigitalPainting#AI
@AiArtsGalleryAnime · Post #6128 · 04.04.2026 г., 06:21
Serene AI Moments ☁️ Calm and beautiful anime art created with artificial intelligence. #AnimeAesthetic#Serene#AiArt#CalmAnime#DigitalPainting#AI
@AiArtsGalleryAnime · Post #6104 · 29.03.2026 г., 06:17
Serene AI Moments ☁️ Calm and beautiful anime art created with artificial intelligence. #AnimeAesthetic#Serene#AiArt#CalmAnime#DigitalPainting#AI
@AiArtsGalleryAnime · Post #6068 · 20.03.2026 г., 06:11
Serene AI Moments ☁️ Calm and beautiful anime art created with artificial intelligence. #AnimeAesthetic#Serene#AiArt#CalmAnime#DigitalPainting#AI
@AiArtsGalleryAnime · Post #6042 · 14.03.2026 г., 06:09
Serene AI Moments ☁️ Calm and beautiful anime art created with artificial intelligence. #AnimeAesthetic#Serene#AiArt#CalmAnime#DigitalPainting#AI
@AiArtsGalleryAnime · Post #6017 · 08.03.2026 г., 06:07
Serene AI Moments ☁️ Calm and beautiful anime art created with artificial intelligence. #AnimeAesthetic#Serene#AiArt#CalmAnime#DigitalPainting#AI
@AiArtsGalleryAnime · Post #5993 · 02.03.2026 г., 06:06
Serene AI Moments ☁️ Calm and beautiful anime art created with artificial intelligence. #AnimeAesthetic#Serene#AiArt#CalmAnime#DigitalPainting#AI
@AiArtsGalleryAnime · Post #5961 · 23.02.2026 г., 06:56
☁️ Serene AI Moments ☁️ Calm and beautiful anime art created with artificial intelligence. #AnimeAesthetic#Serene#AiArt#CalmAnime#DigitalPainting#AI
@AiArtsGalleryAnime · Post #5913 · 11.02.2026 г., 06:43
☁️ Serene AI Moments ☁️ Calm and beautiful anime art created with artificial intelligence. #AnimeAesthetic#Serene#AiArt#CalmAnime#DigitalPainting#AI