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

Пребарај: #pixelage

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

@NothingPhone2Updates · Post #553 · 05.02.2025 г., 18:08

Pixelage Official | Android 15 | Nothing Phone (2) ✍️ Details: - Version: 2.5 - Codename: #Pong - Released: 5/2/25 🔽 Download: Here | Mirror 🆘 Support : Here ⚙️ Installation: Here 📸 Screenshots: Here ✨ Source Changelogs: Here 🔖 Tags : #ROM#AOSP#pixelage#V#qpr1 ✨ Changelogs - switched to a different tree - clean flash recommended ✍️ Note: - Meteoric kernel is baked in with prepatched KSU - gapps inbuilt, don't flash gapps 🏆 Credits - @Ghosuto7 for trees - Fabian for PA Glyph Implementation 😎 Maintainer : @Drishal 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #524 · 23.01.2025 г., 08:38

Pixelage Official | Android 15 | Nothing Phone (2) ✍️ Details: - Version: 2.4 - Codename: #Pong - Released: 23/1/24 🔽 Download: [ Here ] (Sideload/Flash via orangefox recovery) 🆘 Support : Here ⚙️ Installation: Here 📸 Screenshots: Here ✨ Source Changelogs: Here 🔖 Tags : #ROM#AOSP#pixelage#V#qpr1 ✨ Changelogs - updated to NOS V3.0-250113-1723 ✍️ Note: - Meteoric kernel is baked in with prepatched KSU - gapps inbuilt, don't flash gapps - IF CLEAN FLASHING MAKE SURE TO REMOVE SCEEEN LOCK FROM PREVIOUS ROM 🏆 Credits - Chandu for base DT - Hellboy for Meteoric kernel - Fabian for PA Glyph Implementation - Testers: @Devasee@notnaito 😎 Maintainer : @Drishal 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #502 · 30.12.2024 г., 13:59

Pixelage Official | Android 15 | Nothing Phone (2) ✍️ Details: - Version: 2.3 - Codename: #Pong - Released: 30/12/24 🔽 Download: [ Here ] (Sideload/Flash via orangefox recovery) 🆘 Support : Here ⚙️ Installation: Here 📸 Screenshots: Here ✨ Source Changelogs: Here 🔖 Tags : #ROM#AOSP#pixelage#V#qpr1 ✨ Changelogs - official build ✍️ Note: - Meteoric kernel is baked in with prepatched KSU - gapps inbuilt, don't flash gapps 🏆 Credits - Chandu for base DT - Hellboy for Meteoric kernel - Fabian for PA Glyph Implementation - Testers: @Devasee@notnaito 😎 Maintainer : @Drishal 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #497 · 21.12.2024 г., 16:37

Pixelage | Android 15 | Nothing Phone (2) ✍️ Details: - Version: 2.3 - Codename: #Pong - Released: 12/12/24 🔽 Download: [ Here | sourceforge ] (Sideload/Flash via orangefox recovery) 🆘 Support : Here ⚙️ Installation: Here 📸 Screenshots: Here ✨ Source Changelogs: Here 🔖 Tags : #ROM#AOSP#pixelage#V#qpr1 ✨ Changelogs - qpr1 ✍️ Note: - Meteoric kernel is baked in with prepatched KSU - gapps inbuilt, don't flash gapps 🏆 Credits - Chandu for base DT - Hellboy for Meteoric kernel - Fabian for PA Glyph Implementation - Testers: @Devasee@notnaito 😎 Maintainer : @Drishal 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #633 · 12.06.2025 г., 11:27

Pixelage - Official | Android 15 | Nothing Phone (2) ✍️ Details: - Version: 2.8 - Codename: #Pong - Type: #Gapps - Released: 10/6/25 🔽 Download: Here | Mirror 🆘 Support : Here ⚙️ Installation: Here 📸 Screenshots: Here ✨ Changelogs: Here 🔖 Tags : #ROM#AOSP#Pixelage#V#QPR2#Official ✍️ Note: - Meteoric kernel is baked in with prepatched KSU - Gapps inbuilt, don't flash gapps 🏆 Credits - @Ghosuto7 for trees - Hellboy & Fabian for PA Glyph Implementation 👤 Maintainer : @Drishal 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2