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 слични објави

Пребарај: #undervaluation

当前筛选 #undervaluation清除筛选
Crypto M - Crypto News

@CryptoM · Post #64763 · 09.04.2026 г., 20:15

🚀 Ether Rises Over 6% as Undervaluation Signals Potential Retest of Higher Levels Ether experienced a 6.33% increase, surpassing $2,150, with indicators suggesting a potential retest of the $2,400–$2,500 range. According to NS3.AI, the Capriole Macro Index Oscillator registered a reading of -2.42, indicating that Ether is in a rare undervaluation zone. This development has sparked interest among investors, who are closely monitoring the cryptocurrency for further movements. #Ether#Crypto#Ethereum#Undervaluation#PriceIncrease#Investment#CryptoTrading#NS3AI#ETH

Crypto M - Crypto News

@CryptoM · Post #64918 · 10.04.2026 г., 09:28

🚀 Goldman Sachs Highlights Undervaluation in Global IT Sector Goldman Sachs has identified the global IT sector as undervalued following a significant decline in its valuation premium. According to NS3.AI, analysts at Goldman Sachs noted that the sector is currently trading at a lower price-to-earnings ratio compared to consumer discretionary, consumer staples, and industrials. They also pointed out that earnings revisions in the tech sector are more robust than in other sectors. However, they cautioned that tighter credit conditions or reduced revenue from hyperscalers could impact the sector's spending returns. #GoldmanSachs#ITsector#undervaluation#valuation#techsector#earningsrevisions#creditconditions#hyperscalers#consumerdiscretionary#consumerstaples#industrials