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

Резултати

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

Пребарај: #babur

当前筛选 #babur清除筛选

👳‍♀14-fevral – Zahiriddin Muhammad Bobur tavallud topgan kun Bobur (1483–1530) – buyuk o‘zbek shoiri, mutafakkir, tarixshunos va davlat arbobi, Boburiylar sulolasi asoschisi. “Boburnoma” va g‘azallari orqali u sevgi, vatan, inson qadri va adolat g‘oyalarini tarannum etdi. Bobur merosi millatimiz iftixori __________ 👳‍♀14 февраля - день рождения Захириддина Мухаммада Бабура Бабур (1483-1530) - великий узбекский поэт, мыслитель, историк и государственный деятель, основатель династии Бабуридов. Через "Бабур-наме" и газели он воспевал идеи любви, родины, человеческого достоинства и справедливости. Наследие Бабура - гордость нашего народа __________ 👳‍♀February 14 - Zahiriddin Muhammad Babur's birthday Babur (1483-1530) - a great Uzbek poet, thinker, historian and statesman, founder of the Baburid dynasty. Through his "Baburnama" and ghazals, he celebrated the ideas of love, homeland, human dignity and justice. Babur's legacy is the pride of our nation #GSBE#GraduateSchool#Babur#King#Poet 🔝Web-site |🔝Facebook | 🔝Instagram | 🔝Youtube

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40836 · 20.03.2026 г., 23:10

Part 2: Babur, at age 13, wrote in the Baburnama about his feelings for a boy named Baburi: > “In those leisurely days, I discovered in myself a strange inclination — nay! as the verse says, ‘I maddened and afflicted myself’ — for a boy in the camp‑bazar, his very name, Bāburī, fitting in. Up till then I had had no inclination for anyone… From time to time Bāburi came to my presence but out of modesty I could never look straight at him… I got so confused that I almost went right off.” 💌📖👑 Note: this does not mean he was homosexual. Such feelings can be a normal part of teenage self-discovery. @googlefactss #Baburnama#Babur#MughalHistory#HistoricalFacts#LoveInHistory#Memoir#HonestWriting

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40835 · 20.03.2026 г., 23:01

Part 1: Babur, the Mughal emperor and a Muslim, wrote the Baburnama, a detailed personal memoir. In it, he shared his feelings openly. He wrote about his love and admiration for women. He also felt strong affection and admiration for a boy named Baburi. He described these emotions with honesty and detail. He sometimes wrote poems about his feelings. His writing shows both his emotional sensitivity and his poetic talent. He mixed personal experiences, romantic feelings, and reflections on life. Babur’s memoir is considered important for both history and literature. It gives a rare glimpse into his private thoughts, he was not afraid to show his personal desires and emotions. Both his relationships with women and his emotional attachment to Baburi are part of the memoir. His writing style is clear, candid, and expressive. The writings are valued for its literary quality and honesty. 💌📖👑🕌 [Read more1] [Read more2] @googlefactss #Baburnama#Babur#MughalHistory#HistoricalFacts#LoveInHistory#Memoir#Islam