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 слични објави

Пребарај: #ussanctions

当前筛选 #ussanctions清除筛选
Venezuelanalysis

@venanalysis · Post #2012 · 24.06.2025 г., 19:05

📑🖊 OPINION | Demonizing Nicolás Maduro: Fallacies and Consequences In his latest opinion piece, Steve Ellner argues that saying 'I oppose sanctions' while criticizing the Maduro government’s policies as if they were separate issues is misleading. He stresses that sanctions and domestic policy are deeply interconnected, and that ignoring this relationship reinforces regime-change narratives and undermines international solidarity. 🔗 Read the full opinion piece here: https://shorturl.at/3J2tg #NicolasMaduro#Sanctions#USSanctions

Venezuelanalysis

@venanalysis · Post #1856 · 20.01.2025 г., 18:02

The fight over CITGO intensifies as the Delaware auction restarts amid low bids, creditor disputes, and parallel lawsuits. Behind the corporate scramble lies a deeper story of US sanctions and opposition mismanagement, threatening what Venezuela calls the ‘theft of the century.’ Watch the full video to learn more! #venezuela#citgo#sanctions#ussanctions

Venezuelanalysis

@venanalysis · Post #1886 · 21.02.2025 г., 19:03

📝 INTERVIEW | Descendents of Cacique Ähuänumä: The 4F Huo̧ttö̧ja̧ Commune In Venezuela’s Amazonas state, the February 4 Huo̧ttö̧ja̧ Commune brings together Indigenous governance and communal socialism. With collective land tenure and assembly-based decision-making, its people continue a tradition of resistance. The Life Plan is central to their way of life. Integrating ancestral wisdom and modern education, it dictates when to plant, hunt, and harvest—ensuring harmony with nature. 🔗 Read the latest interview from VA’s Communal Resistance Series here: https://shorturl.at/B37yt #CommunalandWorkingClassResistance#Communes#IndigenousPeoples#USSanctions

Crypto M - Crypto News

@CryptoM · Post #64621 · 09.04.2026 г., 11:37

🚀 Iran Utilizes Cryptocurrency for Strait of Hormuz Passage Fees Iran is employing cryptocurrency to collect fees from ships passing through the Strait of Hormuz. According to NS3.AI, TRM highlighted that the rapid nature of digital currency transactions and their operation outside the U.S. banking system complicate efforts by the U.S. to freeze or block these payments in real time. #Iran#Cryptocurrency#StraitOfHormuz#DigitalCurrency#Shipping#USSanctions#Blockchain