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

Резултати

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

Пребарај: #gigi

当前筛选 #gigi清除筛选
I-DLE* UPDATE (SLOW)

@gidle_update · Post #45695 · 16.09.2025 г., 11:06

250915 || @Withmuu_twt 𝕏 UPDATE [📢] YUQI 1st Single [Motivation] POP-UP guide 𝗪𝗵𝗮𝘁'𝘀 𝗬𝗼𝘂𝗿 𝗠𝗼𝘁𝗶𝘃𝗮𝘁𝗶𝗼𝗻-? Welcome to a space full of persistence and determination-💌 From various MDs of the album concept to events you can participate in, meet them at the popup ❤️ #아이들#idle #우기#YUQI #Motivation #MO#아프다 #GIGI#GIGI_SUPERSTAR #YUQI_PopUp –🦋 ── @GIDLE_UPDATE ──

MessageInABottle

@mib_messageinabottle · Post #6978 · 27.05.2024 г., 14:00

Video (#1 above) surfaced last week of several rich upper class kids holidaying in the exclusive #German resort island of #Sylt, singing along to a tune called "L'Amour toujours" by Italian DJ #Gigi D'Agostino, but using words associated with the German Extreme #RightWing "Ausländer raus, Deutschland den Deutschen, Ausländer Raus" "Foreigners out, Germany for Germans, Foreigners out!" The German media and Gov't went into overdrive and the 5 rich kids involved, were soon identified, named&shamed, and have now been totally and utterly "ge-#canceled", losing jobs and probably any hope of a quiet future. The re-worded tune however has now gone completely viral, spawning numerous other memes and parodies (videos #3, #4, #5 above) It's a very clear example of the "Barbara #Streisand" Effect in action

━━━━━━━━━━━━━━━━ 🎬 *WATCH THE DANCE:* 👉https://www.youtube.com/watch?v=Um4W3-nTH68 👉 Try the challenge! Can YOU do Eskista? ━━━━━━━━━━━━━━━━ #Eskista#EthiopianDance#CulturalPride#ViralDance#TikTokChallenge#EthiopianMusic#TeddyAfro#Gigi#ኢትዮጵያ