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

Резултати

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

Пребарај: #gosmartchain

当前筛选 #gosmartchain清除筛选
Go! Announcements

@gorwachain_announcements · Post #515 · 30.08.2024 г., 14:09

🔒Are you worried about the safety of your digital assets? That should be the least of your worries with Go! smartchain onboard Dig deeper here 👇 https://gosmartchain.ai Tokenization on Go! SmartChain AI. offers enhanced security features to keep your investments safe In addition to that, your transactions is made permanent and transparent And your digital assets safe from the risk of fraudulent activities #Tokenization#BlockchainSecurity#GoSmartChain#DigitalAssets ----------------- Join: 🐣X✉️Chat✉️News🤖Discord Play: 🕹️TON App💻Web App Info: 🖥Newsletter🌐Website🌐Blog

Go! Announcements

@gorwachain_announcements · Post #510 · 27.08.2024 г., 13:18

🌟 Revolutionize with RealFi by Go! SmartChain AI! 🌟 Here's a sneak peak into how Realfi is transforming communities with Go!👇 🔗https://goplatform.io/blog/introducing-realfi-transforming-communities-with-decentralized-ai RealFi represents a significant leap in integrating AI, blockchain, and community-driven initiatives With the ability to tokenize anything in seconds, RealFi makes the process simple, fun, and rewarding for you to participate and benefit. Join Go! on this transformative journey. #Realfi#Gosmartchain#AI#blockchain#tokenize ------------------------- Join: 🐣X✉️Chat✉️News🤖Discord Play: 🕹️TON App💻Web App Info: 🖥Newsletter🌐Website🌐Blog

Go! Announcements

@gorwachain_announcements · Post #1056 · 13.10.2025 г., 19:08

Every transaction tells a story. Validated. Broadcast. Secured on Go! SmartChain. This is how real-world value becomes digital — fast, transparent, and verified. 💡 Try it yourself: https://app.gosmartchain.ai #GSMC#GoSmartChain#RWA#RealFi#Blockchain

Go! Announcements

@gorwachain_announcements · Post #518 · 31.08.2024 г., 12:40

🚀 Time to Check In, Go! SmartChain AI Community! Check in now if you're yet to👇 🔗https://t.me/thegoprojectbot?start=twitter Here's an another opportunity to increase your daily dose of engagement and rewards! 🎮💰 And once you're in 1. Click "Open App" to get started 2. Tap the Go! token to collect rewards 3. Complete your daily tasks and quests to earn GoXP Most importantly, Stay active and climb your way to the top. Your participation paves the way for you 💪 #CheckIn#EarnRewards#GoSmartChain#GoTonapp ----------------- Join: 🐣X✉️Chat✉️News🤖Discord Play: 🕹️TON App💻Web App Info: 🖥Newsletter🌐Website🌐Blog

Go! Announcements

@gorwachain_announcements · Post #547 · 11.09.2024 г., 14:13

🚀 Ready to build & secure the future of decentralized finance? Dive into a day in the life of a developer & validator on the Lysa Testnet! Learn how to create dApps, validate blocks, and earn rewards on Go! SmartChain AI. Explore more👇 👉https://tally.so/r/wQYoxl #Blockchain#DeFi#RealFi#LysaTestnet#GoSmartChain#developers#validators#BlockchainGaming ----------------- Join: 🐣X✉️Chat✉️News🤖Discord Play: 🕹️TON App💻Web App Info: 🖥Newsletter🌐Website🌐Blog