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

Пребарај: #firmware

当前筛选 #firmware清除筛选
纯情男高

@hanzichen · Post #1372 · 17.11.2025 г., 18:15

OnePlus Archive OnePlus Archive is a firmware repository for OnePlus phones offering stock OTA images and full firmware packages. It includes archived files for specific partition images to save bandwidth and storage, along with boot/init_boot images for rooting, un-rooting, flashing stock firmware and aftermarket development purposes. 🔗 Links: - GitHub repo Developer: Spike ❤️ Support the Project If this project makes your life easier, here are a few quick ways to show some love: ⭐ Star the repo/app ☕ Buy a coffee for the developer 🛠 Contribute code, issues, or pull-requests 🏷 Tags: #Android#OnePlus#Firmware

Oneplus 13 Updates

@OnePlus13Series · Post #349 · 13.11.2025 г., 15:52

Oneplus Archive This project provides official, unmodified OnePlus stock firmware images for supported models, ideal for rooting, flashing custom ROM(s) and more ⚙️ Repo Link: Here 👤 Maintainer: Spike & Team #oneplus#firmware#boot#otaimage#root

GitHub Trends

@githubtrending · Post #15033 · 06.08.2025 г., 12:00

#shell#buildroot_external_tree#firmware#ingenic#ip_camera#ipc#ipcamera Thingino is free, open-source firmware designed specifically for IP cameras using Ingenic SoC chips. It customizes the software to fit each supported camera model, making the camera easier to use and more efficient. You can build the firmware yourself using the provided instructions and tools, and there is a helpful web interface to control camera features like pan, tilt, night mode, and streaming. This gives you more control and flexibility over your camera without relying on proprietary software. It supports many camera models, and the community offers resources like a wiki, chat groups, and development guides to help you get started and customize your device. This benefits you by providing a customizable, transparent, and community-supported alternative to closed camera firmware. https://github.com/themactep/thingino-firmware