@googlefactss · Post #40777 · 12.03.2026 г., 07:01
A group of jellyfish is called a bloom, swarm, or smack. @googlefactss#nowyouknow
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
Пребарај: #nowyouknow
@googlefactss · Post #40777 · 12.03.2026 г., 07:01
A group of jellyfish is called a bloom, swarm, or smack. @googlefactss#nowyouknow
Hashtags
@googlefactss · Post #40758 · 07.03.2026 г., 15:04
Jellyfish move in essentially two ways. They take water in their bell and then squirt it out behind them, which creates a jet of water that moves them forward. They also drift on water currents. @googlefactss#nowyouknow
Hashtags
@googlefactss · Post #40710 · 27.02.2026 г., 07:04
Horseshoe crabs are not crabs at all. They are not even crustaceans. Instead, they have their own separate class named Merostomata. They have hardly changed since the age of the dinosaurs, and their closest-living relatives are spiders @googlefactss#nowyouknow
Hashtags
@googlefactss · Post #40525 · 11.01.2026 г., 19:02
Blind people smile even though they have never seen anybody else smile. Facial expressions like smiling are largely innate and biological, not just learned through visual imitation and not learned at all. @googlefactss#nowyouknow
Hashtags
@googlefactss · Post #39979 · 30.10.2025 г., 08:02
Stan is an ancient Persian word meaning “land” or “nation,” and Kazakh means “wanderer,” “adventurer,” or “outlaw.” Therefore, the name Kazakhstan translates as “Land of the Wanderers. @googlefactss#nowyouknow
Hashtags
@googlefactss · Post #39972 · 29.10.2025 г., 08:48
In terms of absolute size and in proportion to overall body mass, the human penis is longer and thicker than that of any other primate. For instance the average size of the human penis is 8-10 cm when flaccid and 13-15 cm when erect while gorillas, which are the largest primates, have a penis size of approximately 4 cm in length when erect. @googlefactss#nowyouknow
Hashtags
@googlefactss · Post #39942 · 23.10.2025 г., 07:58
The colors of fire hydrants give a reasonably accurate picture as to how much water flow and pressure they can provide @googlefactss#nowyouknow
Hashtags
@googlefactss · Post #39922 · 13.10.2025 г., 12:57
The position dogs assume when they are inviting other pets to play is called a play bow. @googlefactss#nowyouknow
Hashtags
@googlefactss · Post #39899 · 03.10.2025 г., 22:04
The historical figure who inspired the Santa Claus legend, Saint Nicholas, was born in Patara, Turkey, in the 3rd century A.D. @googlefactss#nowyouknow
Hashtags
@googlefactss · Post #39888 · 29.09.2025 г., 17:20
Greek philosopher Aristotle (384–322 BC) thought the heart, not the brain, was the center of mental functions, emotions, and intellect. He considered the heart the core of the body's "psychical fire" and the source of its heat, with the brain's main role being to cool the blood. @googlefactss#nowyouknow
Hashtags
@googlefactss · Post #39885 · 29.09.2025 г., 13:02
The al-Qarawiyyin Library in Fez, Morocco is the oldest working library in the world. It was founded in 859 CE by Fatima al-Fihriya. @googlefactss#nowyouknow
Hashtags
@googlefactss · Post #40641 · 09.02.2026 г., 15:02
Napoleon I banned fashion dolls because he was nervous they could be used to send secret messages. [Read more] @googlefactss#nowyouknow#history
Hashtags