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

Резултати

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

Пребарај: #childabuse

当前筛选 #childabuse清除筛选
Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40811 · 17.03.2026 г., 07:02

Female genital mutilation (FGM) also misleadingly known as "female circumcision" removes and injures parts of the female genitals for non-medical reasons. It is usually performed on girls from infancy to age 15. It has no health benefits and can cause severe pain, heavy bleeding, infection, shock, infertility, childbirth complications, and psychological trauma. Over 230 million women and girls worldwide have undergone FGM. No religion requires or asks for this practice. 🚫✂️👧🌍⚖🪧 Warning, the link and information about this is not for the faint of heart. Research about this might be disturbing to some people. [Read more at your own discretion] [Poll about your opinions] @googlefactss #facts#humanrights#health#womensrights#education#globalissues#childabuse

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40852 · 23.03.2026 г., 23:01

Boko Haram is an extremist group in northeastern Nigeria. It rejects Western education and wants strict Islamic law. The name means "fake is forbidden" , fake means western education in this case. The group raids villages and schools, kidnaps children, and forces some into slavery or as child soldiers. It has also carried out bombings, assassinations, and other attacks. The group pledged allegiance to the Islamic State and later split into rival factions. Its actions have killed tens of thousands and displaced millions. 🕌💣🚨👶 [Read more] @googlefactss #BokoHaram#Nigeria#childabuse#ISWAP#extremism#didyouknow