TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #303 · 27 дек.

Наверняка вы замечали, что в Python есть удобная функция для получения переменной окружения os.getenv(NAME) И её "сестра" для создания или изменения переменных окружения os.putenv(NAME, VALUE) Но почему-то putenv() не работает как должно. Энвайромент не обновляется! os.putenv('MYVAR', '1') print(os.getenv('MYVAR')) ... и ничего 😴 Почему так? На самом деле энвайромент обновляется, но это значение не добавляется в словарь os.environ. Откройте исходник функции os.getenv(). Это просто шорткат для os.environ.get() В то время как putenv() это built-in С-функция. Словарь os.environ (или точней класс из MutableMapping) создаётся из энвайромента в момент инициализации. Функция putenv() самостоятельно его не изменяет. В тоже время, когда вы создаёте или изменяете ключ в os.environ, автоматически вызывается putenv() в методе __setitem__(). То есть, технически putenv() всё делает верно, но в os.environ это не отражается. Можно проверить так: >>> os.putenv('MYVAR', '123') >>> os.system('python -c "import os;print(os.getenv(\'MYVAR\'))"') 123 Я объявил переменную в текущем процессе и вызвал дочерний процесс, который её унаследовал и получил в составе os.environ. Аналогично при удалении переменной вызывается еще одна built-in функция unsetenv(), удаляющая переменную из системы. Итого ▫️ Удобней всего явно обновлять переменные через os.environ ▫️ Есть способ неявно создать/удалить переменную через putenv/unsetenv, что не повлияет на os.environ но изменит энвайромент и передаст изменения сабпроцессам. Но так лучше не делать! ▫️os.environ это просто обертка для built-in функций putenv() и unsetenv(). #basic

Hashtags

Резултати

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

Пребарај: #ether

当前筛选 #ether清除筛选
SIGNAL

@finsignal · Post #3127 · 23.05.2024 г., 06:55

Good morning, everyone! 🌄 🤔 The cue ball froze around 69.500, but the #Ether, despite the sideways bitcoin, is trying to grow and is trading around 3800. I think that they will try to get through the Air today or tomorrow to the 3.850-3.870 area. But then everything will depend on #Bitcoin: if the cue ball supports the market with growth, then the #Ether will be able to go above $ 4,000. 😎In general, nothing has been dented on the market since yesterday and the alignment is still the same.

Venture Village Wall 🦄

@venturevillagewall · Post #4158 · 15.02.2025 г., 10:00

OM Whale Transfers Millions to Binance A significant OM whale (0x17...fe76) transferred 10.711 million OM to Binance today, valued at approximately 80.88 million USD. Previously, this whale had withdrawn OM worth around 4.82 million USD from Binance between March 1-6, 2024. This indicates a potential profit nearing 84 million USD for the whale. More Details #OM#Binance#Crypto#Whale#Investment#Market#Profit#Trading#Blockchain#Ether

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 #65226 · 12.04.2026 г., 05:55

🚀 Bitcoin and Ether Prices Could Signal Sustainable Growth, Says Analyst Macro analyst Jordi Visser has suggested that Bitcoin surpassing $76,000 and Ether exceeding $2,400 might indicate the beginning of a sustainable upward trend this year. According to NS3.AI, Visser expressed confidence in the market's resilience, noting that he does not foresee a recession. Additionally, data from the United States Bureau of Labor Statistics revealed that the Consumer Price Index (CPI) for April increased by 3.3% compared to the previous year. #Bitcoin#Ether#Cryptocurrency#MarketAnalysis#SustainableGrowth#MacroEconomics#CPI#Inflation#BTC#ETH