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

Резултати

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

Пребарај: #suinami

当前筛选 #suinami清除筛选
Cetus Announcements

@CetusProtocol · Post #138 · 08.05.2023 г., 10:04

THE $CETUS IDO IS LIVE NOW! 🎉 THE $CETUS IDO IS LIVE NOW! 🔥 THE $CETUS IDO IS LIVE NOW! 🚀 Let the #Suinami waves beat stronger! 🌊🐳 👉: ​https://app.cetus.zone/launchpad https://twitter.com/CetusProtocol/status/1655513092904861697?s=20 @everyone

Hashtags

Cetus Announcements

@CetusProtocol · Post #137 · 07.05.2023 г., 17:19

The $CETUS IDO will be LIVE in 17 hours ⏰! You can access the IDO page via the "Launchpad" section on our website https://app.cetus.zone/launchpad. Get ready for it guys. LFG! 🚀🚀🚀#Suinami See IDO details: https://medium.com/@CetusProtocol/the-cetus-ido-is-coming-f7dedf4031a3 https://twitter.com/CetusProtocol/status/1655257429905666048?s=20 @everyone

Hashtags

Haedal Protocol

@HaedalProtocol · Post #35 · 29.11.2023 г., 20:18

Users can view all the available trading pools of haSUI-SUI on @CetusProtocol and @Turbos_finance via https://haedal.xyz/defi👀👀 Stake and earn High APR with incentives through Haedal at one click🖱#Suinami🌊 https://x.com/HaedalProtocol/status/1729418342325428356?s=20

Hashtags

Haedal Protocol

@HaedalProtocol · Post #34 · 29.11.2023 г., 20:18

Exciting news!🤩@HaedalProtocol just officially completed the second smart contract audit conducted by @osec_io , one of the leading audit firms on @SuiNetwork. We will keep building and launch more unique features along the way🏄🏻‍♂️#Suinami https://x.com/haedalprotocol/status/1727647068737679860?s=46&t=wHLWioW005cyd63U3CAzOA

Hashtags

Haedal Protocol

@HaedalProtocol · Post #28 · 29.11.2023 г., 20:17

Great news 🤩🤩 Users will be able to receive both fee earnings and farming rewards by providing liquidity to the haSUI - SUI pool on @CetusProtocol now!!🎁🎁#Suinami🌊 https://x.com/HaedalProtocol/status/1717515766717878445?s=20

Hashtags

Haedal Protocol

@HaedalProtocol · Post #26 · 29.11.2023 г., 20:16

We are excited to announce that haSUI has been accepted as collateral on @bucket_protocol🔥🔥 Users will be able to mint $BUCK with haSUI and interact with various applications for additional yields from now!! #Suinami🌊 https://x.com/HaedalProtocol/status/1714194057361277128?s=20

Hashtags

Haedal Protocol

@HaedalProtocol · Post #22 · 08.09.2023 г., 09:51

We are excited to announce that liquidity pool of haSUI - SUI is LIVE on @CetusProtocol🎉🎉 Stake SUI to haSUI and add liquidity on Cetus for extra rewards💸#Suinami🌊 Access via https://app.cetus.zone/liquidity/deposit?poolAddress=0x871d8a227114f375170f149f7e9d45be822dd003eba225e83c05ac80828596bc @everyone

Hashtags

Cetus Announcements

@CetusProtocol · Post #181 · 03.08.2023 г., 06:12

The Cetus user base has officially exceeded 500,000🔥🔥🔥. What an extremely fast growth! Can't wait for the next milestone🎯. Join #Cetus and surf #Suinami together.🌊🌊🐳 https://twitter.com/CetusProtocol/status/1685902779049816064?s=20 @everyone

Cetus Announcements

@CetusProtocol · Post #178 · 03.08.2023 г., 06:11

We're super excited to launch the Order Split function on Cetus🔥🎉. Now the #Cetus swap can dynamically split orders between multiple pools & routes to minimize slippage & deliver best prices for a wide range of pairs, especially for giant orders⚖️. Surf #Suinami with Cetus.🌊 https://twitter.com/CetusProtocol/status/1683848388390047746?s=20 @everyone

Cetus Announcements

@CetusProtocol · Post #169 · 28.06.2023 г., 18:42

New milestone reached🚩: $300M+ Cumulative Trading Volume on #Cetus has boosted in another short period of time💦 Keep the pace🌊#Suinami https://twitter.com/CetusProtocol/status/1673683506113941506?s=20 @everyone

ПретходнаСтраница 1 од 3Следна