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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #183 · 23 ное.

Python + bash Если вам часто требуется запускать shell команды из Python-кода, какой способ вы используете? Самый низкоуровневый это функция os.system(), либо os.popen(). Рекомендованный способ это subprocess.call(). Но это всё еще достаточно неудобно. Советую обратить своё внимание на очень крутую библиотеку sh. Что она умеет? 🔸 удобный синтаксис вызова команд как функций # os import os os.system("tar cvf demo.tar ~/") # subprocess import subprocess subprocess.call(['tar', 'cvf', 'demo.tar', '~/']) # sh import sh sh.tar('cvf', 'demo.tar', "~/") 🔸 простое создание функции-алиаса для длинной команды fn = sh.lsof.bake('-i', '-P', '-n') output = sh.grep(fn(), 'LISTEN') в этом примере также задействован пайпинг 🔸 удобный вызов команд от sudo with sh.contrib.sudo: print(ls("/root")) Такой запрос спросит пароль. Чтобы это работало нужно соответствующим способом настроить юзера. А вот вариант с вводом пароля через код. password = "secret" sudo = sh.sudo.bake("-S", _in=password+"\n") print(sudo.ls("/root")) Это не все фишки. Больше интересных примеров смотрите в документации. Специально для Windows💀 юзеров #libs#linux

Hashtags

Резултати

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

Пребарај: #metagram

当前筛选 #metagram清除筛选
Airdrop Market Pro

@airdrop_market_pro · Post #1386 · 02.10.2025 г., 15:08

💎 MetaGram Presale — Early Investors’ Edge! Be among the first to secure $MGR before listing at $0.0519. ⚡️ Buy & Earn instantly with our new swap-style UI: 0.001 BNB → 50 $MGR (free airdrop) 0.01 BNB → 500 $MGR 🤝 Referrals: +50% $MGR & +50% BNB back 🔥 Early entry = maximum upside. Don’t wait until the price goes public. 👉metagram.digital #MetaGram#Presale#BNB#Crypto

Airdrop Market Pro

@airdrop_market_pro · Post #1385 · 01.10.2025 г., 20:18

We’ve refreshed the MetaGram presale page! New swap-style UI = faster, clearer, mobile-friendly buying. 🚀 Don’t miss the Presale & Airdrop 💎 0.001 BNB → 50 $MGR (airdrop) ⚡️ 0.01 BNB → 500 $MGR 🤝 Referrals: +50% $MGR & +50% BNB 🔥 Listing price: $0.0519 / MGR 👉https://metagram.digital/airdrop #MetaGram#BNB#Presale#Crypto

Airdrop Market Pro

@airdrop_market_pro · Post #1383 · 29.09.2025 г., 16:38

We’ve refreshed the MetaGram presale page! New swap-style UI = faster, clearer, mobile-friendly buying. 🚀 Don’t miss the Presale & Airdrop 💎 0.001 BNB → 50 $MGR (airdrop) ⚡️ 0.01 BNB → 500 $MGR 🤝 Referrals: +50% $MGR & +50% BNB 🔥 Listing price: $0.0519 / MGR 👉https://metagram.digital/airdrop #MetaGram#BNB#Presale#Crypto

NFT & Airdrop News

@airdrop_nft1 · Post #1382 · 02.10.2025 г., 15:08

💎 MetaGram Presale — Early Investors’ Edge! Be among the first to secure $MGR before listing at $0.0519. ⚡️ Buy & Earn instantly with our new swap-style UI: 0.001 BNB → 50 $MGR (free airdrop) 0.01 BNB → 500 $MGR 🤝 Referrals: +50% $MGR & +50% BNB back 🔥 Early entry = maximum upside. Don’t wait until the price goes public. 👉metagram.digital #MetaGram#Presale#BNB#Crypto

NFT & Airdrop News

@airdrop_nft1 · Post #1381 · 01.10.2025 г., 20:18

We’ve refreshed the MetaGram presale page! New swap-style UI = faster, clearer, mobile-friendly buying. 🚀 Don’t miss the Presale & Airdrop 💎 0.001 BNB → 50 $MGR (airdrop) ⚡️ 0.01 BNB → 500 $MGR 🤝 Referrals: +50% $MGR & +50% BNB 🔥 Listing price: $0.0519 / MGR 👉https://metagram.digital/airdrop #MetaGram#BNB#Presale#Crypto

NFT & Airdrop News

@airdrop_nft1 · Post #1379 · 29.09.2025 г., 16:38

We’ve refreshed the MetaGram presale page! New swap-style UI = faster, clearer, mobile-friendly buying. 🚀 Don’t miss the Presale & Airdrop 💎 0.001 BNB → 50 $MGR (airdrop) ⚡️ 0.01 BNB → 500 $MGR 🤝 Referrals: +50% $MGR & +50% BNB 🔥 Listing price: $0.0519 / MGR 👉https://metagram.digital/airdrop #MetaGram#BNB#Presale#Crypto

Free Airdrop News 🔥🔥🔥

@free_airdrop_nn · Post #1165 · 02.10.2025 г., 15:08

💎 MetaGram Presale — Early Investors’ Edge! Be among the first to secure $MGR before listing at $0.0519. ⚡️ Buy & Earn instantly with our new swap-style UI: 0.001 BNB → 50 $MGR (free airdrop) 0.01 BNB → 500 $MGR 🤝 Referrals: +50% $MGR & +50% BNB back 🔥 Early entry = maximum upside. Don’t wait until the price goes public. 👉metagram.digital #MetaGram#Presale#BNB#Crypto

Free Airdrop News 🔥🔥🔥

@free_airdrop_nn · Post #1164 · 01.10.2025 г., 20:18

We’ve refreshed the MetaGram presale page! New swap-style UI = faster, clearer, mobile-friendly buying. 🚀 Don’t miss the Presale & Airdrop 💎 0.001 BNB → 50 $MGR (airdrop) ⚡️ 0.01 BNB → 500 $MGR 🤝 Referrals: +50% $MGR & +50% BNB 🔥 Listing price: $0.0519 / MGR 👉https://metagram.digital/airdrop #MetaGram#BNB#Presale#Crypto

Free Airdrop News 🔥🔥🔥

@free_airdrop_nn · Post #1162 · 29.09.2025 г., 16:38

We’ve refreshed the MetaGram presale page! New swap-style UI = faster, clearer, mobile-friendly buying. 🚀 Don’t miss the Presale & Airdrop 💎 0.001 BNB → 50 $MGR (airdrop) ⚡️ 0.01 BNB → 500 $MGR 🤝 Referrals: +50% $MGR & +50% BNB 🔥 Listing price: $0.0519 / MGR 👉https://metagram.digital/airdrop #MetaGram#BNB#Presale#Crypto

Airdrop Market Pro

@airdrop_market_pro · Post #1382 · 28.09.2025 г., 20:49

⏳ Only 30 days left until presale & airdrop close — don’t miss your chance! 🚀 MetaGram — Airdrop & Earn Instant BNB! 💎⚡️ 🎁 Airdrop: 5️⃣0️⃣ $MGR for just 0.001 BNB (1 wallet = 1 claim) 💰 Presale: 0.01 BNB → 5️⃣0️⃣0️⃣ $MGR (delivered instantly) 🤝 Referral Bonus: Get ➕5️⃣0️⃣ $MGR and ➕5️⃣0️⃣% BNB from every friend’s presale buy 🎉 Airdrop referrals: ➕2️⃣5️⃣ $MGR for each invite 📈 Listing Price: 1 $MGR = 💵0.051 💦 Join now: 👉@MetagramAirdropbot 🔥 Don’t wait — BNB rewards are already live! #MetaGram#MGR#BNB#Crypto#BSC#Airdrop#Presale

NFT & Airdrop News

@airdrop_nft1 · Post #1378 · 28.09.2025 г., 20:49

⏳ Only 30 days left until presale & airdrop close — don’t miss your chance! 🚀 MetaGram — Airdrop & Earn Instant BNB! 💎⚡️ 🎁 Airdrop: 5️⃣0️⃣ $MGR for just 0.001 BNB (1 wallet = 1 claim) 💰 Presale: 0.01 BNB → 5️⃣0️⃣0️⃣ $MGR (delivered instantly) 🤝 Referral Bonus: Get ➕5️⃣0️⃣ $MGR and ➕5️⃣0️⃣% BNB from every friend’s presale buy 🎉 Airdrop referrals: ➕2️⃣5️⃣ $MGR for each invite 📈 Listing Price: 1 $MGR = 💵0.051 💦 Join now: 👉@MetagramAirdropbot 🔥 Don’t wait — BNB rewards are already live! #MetaGram#MGR#BNB#Crypto#BSC#Airdrop#Presale

Airdrop Market Pro

@airdrop_market_pro · Post #1394 · 20.10.2025 г., 10:23

🔥 MetaGram: MGR Staking is LIVE Stake your $MGR and earn up to 80% APR. • Flexible lock terms: 7–365 days • 0% platform fees while staking • Trading pair: MGR/BNB (details soon) 👉Start now 👉👉👉👉👉👉👉👉 👉https://metagram.digital/staking #MetaGram#MGR#DeFi#BSC#Staking#CryptoEarnings

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