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

Резултати

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

Пребарај: #sats

当前筛选 #sats清除筛选
TokenPocket

@tokenpocket_channel · Post #1000 · 12.12.2023 г., 10:04

🟧 .sats domain name is live on TokenPocket_TP! 👉http://tokenpocket.pro 🌟You can view the .sats domain name directly on the TokenPocket Transfer page after you enter the #Bitcoin wallet address! Make #Bitcoin Great Again! #Ordinals#Bitcoin#SATs#TokenPocket $SATS 【Details】https://twitter.com/TokenPocket_TP/status/1734513835862798519 【Powered By】Crypto Box

TokenPocket

@tokenpocket_channel · Post #1050 · 26.12.2023 г., 09:07

🟧 Easily track the real-time #BRC20 Market on ​TokenPocket_TP! ✅Empowering you with real-time price updates and dynamic percentage changes! 📈 ✅Providing you with a more stable and convenient wallet service! 👉https://www.tokenpocket.pro/ #Bitcoin#BRC20#SATS#ORDI 【Details】https://twitter.com/TokenPocket_TP/status/1739573022779170991 【Powered By】Crypto Box

Most people lose in crypto not because of the market, but because of emotions. The solution is simple: accumulate BTC in small satoshi amounts regularly. You can start with $100 today. This is not financial advice. @saylor@APompliano@aantonop #Bitcoin#BTC#Sats#HODL#CryptoEducation#MyMining

TokenPocket

@tokenpocket_channel · Post #1033 · 21.12.2023 г., 05:33

✨ Unlock simplicity in #BRC20 transfer! 🚀Now, easily transfer your #BRC20 assets in just ONE step! 🔄 Inscribe and transfer seamlessly for a more efficient and convenient experience. 👉https://tokenpocket.pro Ready to experience seamless #BRC20 transactions? Follow the tutorial: 👉https://help.tokenpocket.pro/en/wallet-faq-en/btc-wallet/brc20 #Sats#ordi#RATS#Inscriptions 【Details】https://twitter.com/TokenPocket_TP/status/1737707370523005390 【Powered By】Crypto Box

TokenPocket

@tokenpocket_channel · Post #1025 · 19.12.2023 г., 03:22

🟧 TokenPocket Now Fully supports BRC-20! #BRC20 ✅#BRC20 tokens deposit, withdrawal, and token price display. ✅ Transfer your #BRC20 in one single transaction (Inscribe and Transfer in one step) 🆕We just released the iOS new version 🔺2.1.9🔺(TP Wallet) and Android new version 🔺1.9.5🔺. Upgrade your TP Wallet/TokenPocket and discover the #BRC20#Inscriptions world with us! 👉https://www.tokenpocket.pro/ #Sats#ordi#RATS#Inscriptions 【Details】https://twitter.com/TokenPocket_TP/status/1736949473048420555 【Powered By】Crypto Box

TokenPocket

@tokenpocket_channel · Post #1029 · 20.12.2023 г., 09:36

🟧Easily Track the hottest #BRC20 tokens on ​TokenPocket_TP! Still not too late to know this secret! 😍 ✅Click the "+" button on the #Bitcoin Asset page, and you can view the trending token list directly! Figure out what are most TokenPocket users interested in and get a chance to find a #GEM💎 with your #TokenPocket Wallet! 👉https://www.tokenpocket.pro/ #ORDI#SATs#BIIS#RATS 【Details】https://twitter.com/TokenPocket_TP/status/1737405949722366261 【Powered By】Crypto Box