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

Резултати

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

Пребарај: #earningscalls

当前筛选 #earningscalls清除筛选
🦅 [ perspective ix ]

@perspectiveix · Post #1986 · 01.05.2020 г., 15:30

📰 Tech, Media, and Business News Headlines—Day 1 👉#Intel unveils 10th-gen desktop CPUs, including 5.3GHz flagship (link) 👉#Zoom admits it doesn't have 300M DAUs, quietly correcting the claim in its original blog post to 300M “daily Zoom meeting participants (link) 👉#Telegram postpones the launch of its TON blockchain for a second time, pushing the go-live date to April 2021, and offers to return $1.2B to investors (link) 👉 Andreessen Horowitz raises $515M for its second fund dedicated to #cryptocurrency and #blockchain investments and holdings (link) 👉#Apple Q2: $58.3B revenue, up 1% YoY; $44.9B from products, $13.35B from services; net income of $11.25B (link) 👉#Amazon Q1: $75.5B revenue, up 26% YoY; net income of $2.5B, down from $3.6B in Q1 2019; $10.2B from AWS revenue, up from $7.7B YoY (link) 👉#Twitter Q1: sales up 3% YoY to $808M; net loss of $8M due to COVID-19; mDAUs hit a record 166M, up 24% YoY (link) #️⃣#EarningsCalls 📰@iXDaily via @PerspectiveIX 💌Weekly Newsletter.

🦅 [ perspective ix ]

@perspectiveix · Post #1995 · 07.05.2020 г., 15:32

Tech, Media, and Business News Headlines—Day 6 👉#France is using #AI to check whether people are wearing masks on public transport (link) 👉#Facebook's Oversight Board, who will focus on challenging content issues, such as hate speech and harassment, announces its first 20 members out of a total of 40 (link) 👉 Comedy Central, MTV, Nickelodeon, and more Viacom channels coming to #YouTubeTV (link) 👉#Zoom acquires #Keybase to get end-to-end encryption expertise (link) 👉 Liberty’s Virgin Media and Telefonica’s O2 to merge in the UK in $39B deal (link) 👉#Square Q1: revenue of $1.38B, up 44% YoY; net loss of $106M, up $68M YoY (link) 👉#Square reports $528M in Q1 revenues from its Cash App, with $306M coming from #Bitcoin transactions, exceeding the app's fiat revenue of $222M for the first time (link) 👉#PayPal Q1: misses estimates with revenue of $4.62B, up 13% YoY; net income of $84M, down from $667M YoY (link) 👉#Shopify Q1: revenue of $470M, up 47% YoY; gross merchandise volume of $17.4B, up 46% YoY (link) #️⃣#EarningsCalls 📰@iXDaily by @PerspectiveIX 💌Weekly Newsletter.

🦅 [ perspective ix ]

@perspectiveix · Post #1994 · 06.05.2020 г., 20:53

Tech, Media, and Business News Headlines—Day 5 👉#Apple will host a virtual #WWDC this year — starts on 22 June (link) 👉#Twitter tests a warning message that tells users to rethink offensive replies (link) 👉#Twitter rolls out changes to threaded conversations following tests in its prototype app, #twttr (link) 👉#Airbnb cuts 1,900 jobs, around 25% of its global workforce (link) 👉#Bitcoin is set for ‘Halving’ this month (link) 👉 Leaked videos show #Lenovo’s first gaming #smartphone (link) 👉#Android 11’s public beta to launch with 3 June via live stream (link) 👉#Google’s #Stadia controller will finally work wirelessly with computers starting this week (link) 👉#Microsoft launches #SurfaceBook 3 (link) and #SurfaceHeadphones 2 (link) 👉#Microsoft offers $100,000 to hack its custom Linux OS (link) 👉#Uber lays off 14% of its workforce in COVID-19-related cost-cutting (link) 👉#Pinterest Q1: revenue of $272M, vs. $270M est., up 35% YoY; user base grew to 367M MAUs, up 26% YoY (link) 👉#EA Q4: revenues of $1.39B, beating expectations of $1.19B, up 12% YoY (link) #️⃣#EarningsCalls 📰@iXDaily by @PerspectiveIX 💌Weekly Newsletter.