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

Резултати

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

Пребарај: #uscongress

当前筛选 #uscongress清除筛选
EdgeMarket.AI 📣

@edgemarketai · Post #8180 · 12.05.2026 г., 17:31

🇺🇸 US Congress vs Trump’s $1.5 Trillion Defence Budget The market is live on EdgeMarket. Participants are now predicting whether Congress will approve the proposed historic defence expansion package covering: ✈️ Advanced fighter programs 🚢 Naval expansion 🛰 Defence technology 🤖 AI warfare systems 🛡 National security infrastructure Current Market Sentiment: ✅ YES — 61% ❌ NO — 39% Take your position now: https://edgemarket.ai/bnb/social-media/us-congress-aproval-of-trumps-15-trillion-defence-budget/statistics/69f4861273c4a76eb0961b8f Predict. Stake. Settle. #EdgeMarket#USCongress#Trump#Defence#PredictionMarkets#Web3

Crypto M - Crypto News

@CryptoM · Post #64636 · 09.04.2026 г., 12:15

🚀 U.S. Congress Nears Decision on Financial Framework Legislation The U.S. Congress is approaching a significant milestone in its efforts to establish a framework for the future development of the financial industry. According to BlockBeats, U.S. Treasury Secretary Besent announced on April 9 that Congress has spent nearly five years working on this initiative. It is now time for Senate Banking Committee Republicans to review and advance the CLARITY Act for U.S. President Donald Trump's signature. #USCongress#FinancialLegislation#CLARITYAct#Finance#USPolitics#Treasury#BankingCommittee

Crypto M - Crypto News

@CryptoM · Post #64503 · 09.04.2026 г., 04:05

🚀 U.S. Treasury Secretary Urges Congress to Pass CLARITY Act for Digital Asset Regulation U.S. Treasury Secretary Besant has called on Congress to swiftly pass the CLARITY Act to establish a clear regulatory framework for digital assets. According to Foresight News, the global market value of digital assets has fluctuated between $2 trillion and $3 trillion over the past year, with approximately one-sixth of Americans holding some form of digital asset. The application of blockchain technology in payments, settlements, and physical asset exchanges continues to expand. Cryptocurrencies are no longer niche experiments but are widely adopted technologies globally. The United States must take proactive measures to continue leading in the establishment of rules in this field. #DigitalAssets#Cryptocurrency#Blockchain#USTreasury#CLARITYAct#Regulation#Finance#USCongress#GlobalMarket#Technology