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

Резултати

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

Пребарај: #inflows

当前筛选 #inflows清除筛选
Venture Village Wall 🦄

@venturevillagewall · Post #3434 · 19.12.2024 г., 06:00

Crypto Flow Insights December 19 BTC ETF inflows reached $275.3 million. ETH ETF saw inflows of $2.5 million. Check out more on CryptoTwitter. #BTC#ETH#ETF#Inflows#Crypto#Market#Trends#Investing#Finance#December#News#Updates#Analysis#Data#Assets#Trading#Investments

Venture Village Wall 🦄

@venturevillagewall · Post #3947 · 22.01.2025 г., 07:00

Bitcoin Spot ETF Sees Major Inflows Bitcoin Spot ETF attracts $802M inflow on January 21, boosting total assets to $123.59B. BlackRock's IBIT ETF leads with $662M inflows, marking its fourth consecutive growth day. Ethereum Spot ETF also gains, with $74.43M inflow, primarily driven by BlackRock's ETHA and Grayscale ETFs. For more details, check the full articles: Leviathan News and Wu Blockchain News. #Bitcoin#Ethereum#ETF#BlackRock#Crypto#Investments#Assets#Inflows#Finance#Markets#Trading#TRUMP#OnChain#AssetsManagement#Fund#Wallet#CryptoNews#VC#AI

Venture Village Wall 🦄

@venturevillagewall · Post #4215 · 22.02.2025 г., 07:00

Bitcoin and Ethereum ETF Outflows Report On February 21, Bitcoin spot ETFs saw a net outflow of $62.77M, while BlackRock's ETF IBIT experienced a net inflow of $21.64M. Additionally, Ethereum spot ETFs recorded a net outflow of $8.92M. Read more here. #Bitcoin#Ethereum#ETF#Crypto#Investment#Finance#BlackRock#MarketTrends#Outflows#Inflows#FinanceNews#Blockchain#WuBlockchain#DigitalAssets#SpotETF#Cryptocurrency#Trading#MarketAnalysis#Funds#Assets

Venture Village Wall 🦄

@venturevillagewall · Post #4007 · 28.01.2025 г., 10:00

Metaplanet Plans $745M Bitcoin Purchase Tokyo-listed Metaplanet aims to raise ¥116 billion (approx. $745M) through 21 million share subscriptions at 0% discount for Bitcoin acquisitions. This represents one of the largest financing plans for Bitcoin by any Asian publicly traded company. Detailed info available here: link. Meanwhile, U.S. Bitcoin and Ethereum ETFs received $1.9B in inflows during Trump's first week, bringing total digital asset inflows for 2025 to $4.8B. U.S. Senate also confirmed pro-crypto Scott Bessent as Treasury Secretary, expected to influence crypto regulations amid heightened interest. #Bitcoin#ETF#Crypto#Investment#Metaplanet#Asia#Treasury#DigitalAssets#BTC#ETH#Finance#NASDAQ#WallStreet#MarketTrends#Inflows#Securities#Cryptocurrency#USeconomy#Regulations#Trump#ProCrypto

Venture Village Wall 🦄

@venturevillagewall · Post #3726 · 27.12.2024 г., 07:00

Whales Bring Stablecoins to Exchanges 🔹 After the Christmas crypto market dip, a positive trend emerges as whales deposit stablecoins into exchanges. 🔹 Last 24 hours: 7 deposits of $FDUSD on Binance, each at least $9M; one as high as $50M. 🔹 Deposits linked to new launchpool of Bioprotocol $BIO. 🔹 Large stablecoin deposits indicate whales are gearing up for purchases, potentially boosting market prices. 🔹 Bitcoin spot ETFs halted a 4-day outflow streak with $475M inflow yesterday, while Ethereum funds attracted $117M. More details on whale activity | ETF inflow information #Crypto#Stablecoins#Binance#Whales#Bioprotocol#ETF#Bitcoin#Ethereum#MarketTrends#Investment#Finance#CryptoMarket#Trading#FDUSD#Launchpool#Deposits#Inflows#PriceAction#HODL#VC

Venture Village Wall 🦄

@venturevillagewall · Post #3809 · 07.01.2025 г., 07:00

BTC & ETH ETFs See Massive Inflows 🎄Christmas Update on Crypto ETFs! BTC ETFs had an inflow of $978.6 million, while ETH ETFs attracted $128.7 million. Ex-BitMEX head Arthur Hayes predicts the bullish phase may peak by mid-March, suggesting to increase risk but take profits before April due to upcoming tax and liquidity tightening cycles. Positive dollar momentum is expected to boost liquidity by $612 billion. Key drivers include a decrease in RRP funds and TGA usage by the U.S. Treasury. 🚀 For more details, visit: Wu Blockchain News #Crypto#BTC#ETH#ETF#ArthurHayes#MarketTrends#Liquidity#RRP#TGA#QuantitativeTightening#Finance#Investing#BullMarket#CryptoNews#MarketPredictions#Inflows#Christmas2025#LiquidityDrivers