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

Резултати

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

Пребарај: #kton

当前筛选 #kton清除筛选
TONlines – News

@tonlines · Post #6793 · 16.04.2025 г., 10:24

⚡️The Daily TON: KTON Protocol Transformations #KTON#TON The Daily TON discusses the advancements of the KTON protocol at the Web3 Festival. Dr. Awesome Doge introduced the V2 Contract for KTON, enhancing protocol performance and liquidity management. Aiming for higher yields, KTON aspires to increase TON staking rates and expand from Asia to the USA. Source: link @tonlines

Hashtags

TONlines – News

@tonlines · Post #7434 · 29.05.2025 г., 13:08

⚡️STON.fi Introduces KTON to Enhance DeFi Experience #KTON#DeFi STON.fi has announced the integration of KTON, allowing users to stake Toncoins and receive KTON tokens. This initiative enables participants to earn rewards while engaging in DeFi activities like swaps and lending, positioning STON.fi as a leader in DeFi evolution. Source: link @tonlines

Hashtags

Venture Village Wall 🦄

@venturevillagewall · Post #3991 · 26.01.2025 г., 16:00

KTON Targets $6.12B Liquid Staking Market KTON, a liquid staking protocol by TONX, is set to launch V1 in February, aiming for a significant market expansion in the $6.12 billion liquid staking sector on TON. With Telegram's full support for TON, KTON plans to allow users to stake TON while earning KTON tokens, offering institutional-grade security. The project sees a potential growth from the current liquid staking market of $377 million to match Ethereum's levels, aiming for an 18-fold increase. KTON integrates with leading DEXs like Ethena and Curve Finance to provide flexible income strategies in the DeFi space. #KTON#TON#Staking#LiquidStaking#Blockchain#DeFi#Crypto#Institutional#Investment#Tech#Finance#Ethereum#Telegram#VC#MarketGrowth#Solana#TONX#Security#Innovation#Ecosystem