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

Резултати

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

Пребарај: #bliss

当前筛选 #bliss清除筛选
Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #596 · 21.04.2025 г., 11:13

Bliss - Official | Android 15 | Nothing Phone (2) ✍️ Details: - Version: 18.5 - Codename: #Pong - Released: 21/4/25 🔽Download:Vanilla | Vanilla(Mirror) (Recovery Build) 🆘 Support : Here ⚙️ Installation: Here 📸 Screenshots: Here 🔖 Tags : #ROM#AOSP#Official#Bliss#V ✨ ChangelogsROM | Device ✍️ Note: - Vanilla only - clean flash recommended - you can use this gapps: here, or flash your choice of gapps/microg if you know what you're doing - ksu disabled bcs of official requirements 🏆 Credits - @Ghosuto7 for DT - Hellboy for Meteoric kernel - Fabian for PA Glyph Implementation - Testers 😎 Maintainer : @Drishal 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #567 · 25.02.2025 г., 13:35

Bliss - Official | Android 15 | Nothing Phone (2) ✍️ Details: - Version: 18.3 - Codename: #Pong - Released: 25/2/25 🔽Download:Vanilla | Gapps (Recovery Build) 🆘 Support : Here ⚙️ Installation: Here 📸 Screenshots: Here ✨ Source Changelogs: Here 🔖 Tags : #ROM#AOSP#Official#Bliss#V ✨ Changelogs Rebase tree so clean flash is necessary ✍️ Note: - Both Gapps and Vanilla build available - ksu disabled bcs of official requirements, for kernel with ksu flash this 🏆 Credits - @Ghosuto7 for DT - Hellboy forMeteoric kernel - Fabian & Hellboy for PA Glyph Implementation - Testers 😎 Maintainer : @Drishal 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #539 · 29.01.2025 г., 17:05

Bliss - Official | Android 15 | Nothing Phone (2) ✍️ Details: - Version: 18.2 - Codename: #Pong - Released: 29/1/25 🔽 Download: [ Vanilla | Gapps ] (Recovery Build) 🆘 Support : Here ⚙️ Installation: Here 📸 Screenshots: Here ✨ Source Changelogs: Here 🔖 Tags : #ROM#AOSP#Official#Bliss#V ✨ Changelogs - Update to NOS V3.0-250113-1723 firmware - Improvements to system performance and stability ✍️ Note: - Both Gapps and Vanilla build available 🏆 Credits - Chandu for base DT - Hellboy for Meteoric kernel - Fabian for PA Glyph Implementation - Testers - Note: bliss is not patched with ksu due to official requirements 😎 Maintainer : @Drishal 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #494 · 21.12.2024 г., 10:21

Bliss - Official | Android 15 | Nothing Phone (2) ✍️ Details: - Version: 18.1 - Codename: #Pong - Released: 19/12/24 🔽 Download: [ Vanilla | Gapps ] (Recovery Build) 🆘 Support : Here ⚙️ Installation: Here 📸 Screenshots: Here ✨ Source Changelogs: Here 🔖 Tags : #ROM#AOSP#Official#Bliss#V ✨ Changelogs - Switch to armv9-a and kryo300 CPU variants - Improvements to system performance and stability ✍️ Note: - Both Gapps and Vanilla build available 🏆 Credits - Chandu for base DT - Hellboy for Meteoric kernel - Fabian for PA Glyph Implementation - Testers 😎 Maintainer : @Drishal 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #476 · 24.11.2024 г., 07:09

Bliss - Official | Android 15 | Nothing Phone (2) ✍️ Details: - Version: 18.0 - Codename: #Pong - Released: 24/11/24 🔽 Download: [ Vanilla | Gapps ] (Recovery Build) 🆘 Support : Here ⚙️ Installation: Here 📸 Screenshots: Here ✨ Source Changelogs: Here 🔖 Tags : #ROM#AOSP#Official#Bliss#V ✨ Changelogs - initial A15 official build - Pre rooted allowed in official builds, flash the ksu version youself ✍️ Note: - Both Gapps and Vanilla build available 🏆 Credits - Chandu for base DT - Hellboy for Meteoric kernel - Fabian & Hellboy for PA Glyph Implementation - Testers 😎 Maintainer : @Drishal 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #406 · 23.08.2024 г., 07:20

Bliss - Unofficial | Android 14 | Nothing Phone (2) ✍️ Details: - Version: 17.7 - Codename: #Pong - Released: 23/08/24 🔽 Download: [ GDrive ] (Sideload Build) 🆘 Support : Here ⚙️ Installation: Here 📸 Screenshots: Here ✨ Source Changelogs: Here 🔖 Tags : #ROM#AOSP#Bliss#QPR3#U ✨ Changelogs - initial build ✍️ Note: - Meteoric kernel is baked in with prepatched KSU - gapps already included 🏆 Credits - Chandu for base DT - Hellboy for Meteoric kernel - Fabian for PA Glyph Implementation - Testers 😎 Maintainer : @Drishal 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #471 · 11.11.2024 г., 06:47

Bliss - Unofficial | Android 15 | Nothing Phone (2) ✍️ Details: - Version: 18.0 - Codename: #Pong - Released: 11/11/24 🔽 Download: [ Link ] (Recovery Build) 🆘 Support : Here ⚙️ Installation: Here 📸 Screenshots: Here ✨ Source Changelogs: Here 🔖 Tags : #ROM#AOSP#Community#Bliss#V ✨ Changelogs - initial A15 build ✍️ Note: - Meteoric kernel is baked in with prepatched KSU - Both Gapps and Vanilla build available 🏆 Credits - Chandu for base DT - Hellboy forMeteoric kernel - Fabian and Hellboy for PA Glyph Implementation 😎 Maintainer : @Drishal 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #442 · 24.09.2024 г., 07:54

Bliss - Unofficial | Android 14 | Nothing Phone (2) ✍️ Details: - Version: 17.8 - Codename: #Pong - Released: 24/09/24 🔽 Download: [ Link ] (Recovery Build - flash with ofox) 🆘 Support : Here ⚙️ Installation: Here 📸 Screenshots: Here ✨ Source Changelogs: Here 🔖 Tags : #ROM#AOSP#Official#Bliss#QPR3#U ✨ Changelogs - Add device extras - switch to user build - Add Charging Control - Add dolby support - Improvements to performance and system stability ✍️ Note: - Meteoric kernel is baked in with prepatched KSU - Both Gapps and Vanilla build available 🏆 Credits - Chandu for base DT - Hellboy for Meteoric kernel - Fabian for PA Glyph Implementation - Testers 😎 Maintainer : @Drishal 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #626 · 05.06.2025 г., 14:26

Bliss - Official | Android 15 | Nothing Phone (2) ✍️ Details: - Version: 18.6 - Codename: #Pong - Released: 02/06/2025 - Type: #Vanilla 🔽Download:Here | Mirror | Gapps 🆘 Support : Here ⚙️ Installation: Here 📸 Screenshots: Here 🔖 Tags : #ROM#AOSP#Official#Bliss#V ✨ ChangelogsROM | Device ✍️ Note: - Clean flash recommended - KSU disabled bcs of official requirements 🏆 Credits - @Ghosuto7 for DT - Hellboy for Meteoric kernel - Fabian for PA Glyph Implementation - Testers 👤 Maintainer : @Drishal 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2