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

Резултати

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

Пребарај: #cryptoinfrastructure

当前筛选 #cryptoinfrastructure清除筛选
Crypto M - Crypto News

@CryptoM · Post #65234 · 12.04.2026 г., 07:05

🚀 Sign Partner Sarah to Attend Hong Kong Forum on Crypto and Smart Economy Sign partner Sarah is set to participate in the 'Crypto 2026: From Cryptocurrency to Smart Economy' forum in Hong Kong on April 19. According to ChainCatcher, she will join a roundtable discussion at this event, which is organized by ChainCatcher in collaboration with RootData and is part of the Hong Kong Web3 Carnival. Sign is developing a global distribution platform for premium services and assets. Its first product, EthSign, enables users to sign legally binding agreements using public keys, creating verifiable contract consent records on the blockchain. The second product, TokenTable, assists Web3 projects in efficiently executing, tracking, and managing token distribution processes. The forum will focus on the paradigm shift resulting from the deep integration of AI technology and crypto networks, with in-depth discussions on AI Agent economy, smart payments, RWA, and crypto infrastructure. Positioned at the intersection of technological transition and economic restructuring, this forum aims to provide insights into the current state of the industry and offer forward-thinking perspectives on the future of smart economic systems. #Crypto2026#SmartEconomy#Web3#AI#Blockchain#Cryptocurrency#SmartPayments#TokenDistribution#EthSign#TokenTable#CryptoInfrastructure#HongKongForum#AIAgentEconomy#RWA#TechnologicalTransition#EconomicRestructuring#ChainCatcher#RootData#Web3Carnival