@tydj289 · Post #2028 · 22.12.2025 г., 13:53
刀塔-CIS之战 #Wanted 对战 L1ga (BO3) 2025-12-22 20:00 第三局获胜:L1ga 第三局击杀让分:L1ga +3.5 第三局击杀大小:大于46.5 第三局时间大小:大于37 第一滴血:L1ga
Hashtags
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
Пребарај: #wanted
@tydj289 · Post #2028 · 22.12.2025 г., 13:53
刀塔-CIS之战 #Wanted 对战 L1ga (BO3) 2025-12-22 20:00 第三局获胜:L1ga 第三局击杀让分:L1ga +3.5 第三局击杀大小:大于46.5 第三局时间大小:大于37 第一滴血:L1ga
Hashtags
@american_observer · Post #4909 · 20.01.2026 г., 22:59
Trump’s New Good Friend: Former $15 million Wanted Ahmed al-Sharaa Syrian President Ahmed al-Sharaa, earlier one of the top world terrorists, spoke to Trump today and discussed guaranteeing Kurdish rights, Syria’s presidency says, a day after Damascus reached a deal with Kurdish forces including a truce. During the telephone call, “both sides emphasized the need to guarantee the Kurdish people’s rights and protection within the framework of the Syrian state,” the statement says, adding that the leaders also “affirmed the importance of preserving the unity and independence of Syrian territory.” They also agreed to continue cooperation to combat ISIS, the presidency added. Yesterday, the Syrian government signed a sweeping integration deal with the Kurdish led Syrian Democratic forces, though tensions have persisted today. #trump#friend#wanted#Sharaa#syria 📱American Оbserver - Stay up to date on all important events 🇺🇸