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

Резултати

Пронајдени 1,453 слични објави

Глобално пребарување

Linuxgram 🐧

@linuxgram · Post #18736 · 10.05.2026 г., 19:33

📰 The year of the Linux desktop already happened, just not on desktops Fans have been waiuting for the year of the Linux desktop, but it arrived without us realizing it. 🔗 Source: https://www.xda-developers.com/year-linux-desktop-already-happened-just-not-desktops/ #linux

Hashtags

Linuxgram 🐧

@linuxgram · Post #18725 · 09.05.2026 г., 18:55

📰 Good Job Dell and Lenovo! Hope Others Follow You Lenovo and Dell are now funding the service that ships firmware to millions of Linux devices. 🔗 Source: https://feed.itsfoss.com/link/24361/17337295/lvfs-finally-has-premier-sponsors #linux

Hashtags

Linuxgram 🐧

@linuxgram · Post #18721 · 09.05.2026 г., 16:24

📰 The Linux desktop's biggest upgrade was learning when not to ask the user It finally learned when to stay quiet and let us get back to work. 🔗 Source: https://www.xda-developers.com/linux-desktops-biggest-upgrade-learning-not-ask-user/ #linux

Hashtags

Linuxgram 🐧

@linuxgram · Post #18720 · 09.05.2026 г., 13:27

📰 I stopped recommending Linux Mint after trying Lubuntu on a nine-year-old laptop It's often said that Linux is the perfect way to breathe new life into an old laptop, but the exact version of Linux you should choose is always up in the air. Linux Mint is a common recommendation that's stable and modern enough to have all the features you need, but there are others that are more focused on even older hardware, like antiX and MX Linux. 🔗 Source: https://www.xda-developers.com/stopped-recommending-linux-mint-trying-lubuntu-nine-year-old-laptop/ #linux

Hashtags

Linuxgram 🐧

@linuxgram · Post #18709 · 08.05.2026 г., 08:26

📰 Dirty Frag Vulnerability Made Public Early: Root Privilege On All Distributions One week after the Copy Fail vulnerability, a new Linux local privilege escalation bug has been made public. This time around there are no patches or CVEs yet for this "Dirty Frag" vulnerability as the embargo was broken early and thus the security researcher went ahead and published earlier than anticipated... 🔗 Source: https://www.phoronix.com/news/Dirty-Frag-Linux #linux

Hashtags

Linuxgram 🐧

@linuxgram · Post #18704 · 07.05.2026 г., 20:58

📰 StarFighter Linux laptop with detachable webcam and premium specs finally launches Star Labs has been selling Linux laptops and mini PCs since 2017. While most of the company’s products have featured budget or mid-range hardware, Star Labs introduced a premium laptop called the StarFighter in 2022… and then never managed to ship that laptop. Until now. The Star Labs StarFighter is a Linux laptop with a . 🔗 Source: https://liliputing.com/starfighter-linux-laptop-with-detachable-webcam-and-premium-specs-finally-launches/ #linux

Hashtags

Linuxgram 🐧

@linuxgram · Post #18689 · 06.05.2026 г., 14:20

📰 Dell & Lenovo Now Sponsoring The Linux Vendor Firmware Service Dell and Lenovo have stepped up to become premier sponsors for the Linux Vendor Firmware Service (LVFS) that provides for seamless system firmware and device/component firmware updating under Linux with the Fwupd client... 🔗 Source: https://www.phoronix.com/news/Dell-Lenovo-Sponsoring-LVFS #linux

Hashtags

Linuxgram 🐧

@linuxgram · Post #18685 · 06.05.2026 г., 05:49

📰 New stealthy Quasar Linux malware targets software developers A previously undocumented Linux implant named Quasar Linux (QLNX) is targeting developers' systems with a mix of rootkit, backdoor, and credential-stealing capabilities. 🔗 Source: https://www.bleepingcomputer.com/news/security/new-stealthy-quasar-linux-malware-targets-software-developers/ #linux

Hashtags

Linuxgram 🐧

@linuxgram · Post #18684 · 05.05.2026 г., 21:41

📰 Orion for Linux adds a content blocker and download manager A new beta build of Orion for Linux is available, with the v0.3 update ready for ‘broader, real-world use and feedback’, according to Kagi, the company behind it. Orion for Linux is a native GTK4/libadwaita web browser powered by WebKitGTK, aiming for feature parity with established macOS version (platform-specific features notwithstanding). It launched an alpha in early 2026 and an initial beta in March. 🔗 Source: https://www.omgubuntu.co.uk/2026/05/orion-for-linux-public-beta #linux

Hashtags

Linuxgram 🐧

@linuxgram · Post #18682 · 05.05.2026 г., 20:57

📰 Orion for Linux’s latest beta is out A new beta build of Orion for Linux is available, with the v0.3 update described by its makers, the search company Kagi, as being “ready for broader, real-world use and feedback”. Orion for Linux is a native GTK4/libadwaita web browser powered by WebKitGTK. It launched an alpha build in early 2026 followed by early beta in March. The goal is to offer feature parity with the macOS version (platform-specific features notwithstanding). 🔗 Source: https://www.omgubuntu.co.uk/2026/05/orion-for-linux-public-beta #linux

Hashtags

Linuxgram 🐧

@linuxgram · Post #18678 · 05.05.2026 г., 14:12

📰 Linux is finally ready for gamers, but gamers are still not ready for Linux We're in a golden age of Linux gaming, but most people are not ready to switch. 🔗 Source: https://www.xda-developers.com/linux-ready-for-gamers-but-gamers-not-ready-for-linux/ #linux

Hashtags

Linuxgram 🐧

@linuxgram · Post #18667 · 04.05.2026 г., 11:42

📰 Moving to mainframe can be cheaper than sticking with VMware: Gartner Serious Linux VMs will enjoy big iron – if you can learn to love lock-in risks and skills challenges VMware users considering a new home might find it cheaper to move to an IBM mainframe than adopting Broadcom’s new licenses, according to Gartner Vice President Analyst Alessandro Galimberti.… 🔗 Source: https://go.theregister.com/feed/www.theregister.com/2026/05/04/gartner_state_of_mainframes/ #linux

Hashtags

1234•••100•••121122
ПретходнаСтраница 2 од 122Следна