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

Резултати

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

Пребарај: #plasma

当前筛选 #plasma清除筛选
TokenPocket

@tokenpocket_channel · Post #1684 · 25.09.2025 г., 15:37

Plasma is here. $XPL Easily create & import your #Plasma Wallet on TokenPocket, touching the new area of the global financial system. → https://tp.xyz

Hashtags

Linuxgram 🐧

@linuxgram · Post #18760 · 12.05.2026 г., 18:57

📰 KDE Plasma 6.6.5 Is Out Now to Improve Performance for NVIDIA GPU Users KDE Plasma 6.6.5 is now available as the fifth maintenance update in the KDE Plasma 6.6 desktop environment series with various improvements and bug fixes. 🔗 Source: https://9to5linux.com/kde-plasma-6-6-5-is-out-now-to-improve-performance-for-nvidia-gpu-users #kde#plasma

Hashtags

Linuxgram 🐧

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

📰 KDE’s New CSS-Based Style Engine Union Is Coming to KDE Plasma 6.7 The upcoming KDE Plasma 6.7 desktop environment will finally introduce KDE's new CSS-based style engine called Union as a technical preview. 🔗 Source: https://9to5linux.com/kdes-new-css-based-style-engine-union-is-coming-to-kde-plasma-6-7 #kde#plasma

Hashtags

Linuxgram 🐧

@linuxgram · Post #18442 · 15.04.2026 г., 09:54

📰 A PHP Dev Just Solved a 20+ Year-Old KDE Plasma Problem No One Else Would KWin can now show different virtual desktops on each screen independently. 🔗 Source: https://feed.itsfoss.com/link/24361/17319404/kde-plasma-per-screen-virtual-desktops #kde#plasma

Hashtags

Linuxgram 🐧

@linuxgram · Post #18334 · 07.04.2026 г., 15:15

📰 KDE Plasma 6.6.4 Is Out to Reduce CPU and GPU Load for Full-Screen Windows KDE Plasma 6.6.4 is now available as the fourth maintenance update in the KDE Plasma 6.6 desktop environment series with various improvements and bug fixes. 🔗 Source: https://9to5linux.com/kde-plasma-6-6-4-is-out-to-reduce-cpu-and-gpu-load-for-full-screen-windows #kde#plasma

Hashtags

Linuxgram 🐧

@linuxgram · Post #18323 · 06.04.2026 г., 14:58

📰 KDE 4’s Air Theme Making a Comeback, Oxygen Gets Major Revamp for Plasma 6.7 The Oxygen and Air themes from the KDE 4 desktop environment are making a major comeback with the upcoming KDE Plasma 6.7 release. 🔗 Source: https://9to5linux.com/kde-4s-air-theme-making-a-comeback-oxygen-gets-major-revamp-for-plasma-6-7 #kde#plasma

Hashtags

Linuxgram 🐧

@linuxgram · Post #18308 · 04.04.2026 г., 11:57

📰 KDE Plasma 6.7 Desktop Environment Is Coming on June 16th, Here’s What to Expect The upcoming KDE Plasma 6.7 desktop environment is expected on June 16th, 2026, with many new features and improvements. Here’s what’s to expect. 🔗 Source: https://9to5linux.com/kde-plasma-6-7-desktop-environment-is-coming-on-june-16th-heres-what-to-expect #kde#plasma

Hashtags

Linuxgram 🐧

@linuxgram · Post #18219 · 28.03.2026 г., 08:16

📰 KDE Plasma 6.7 will finally fix the most annoying part of tweaking your microphone volume As much as I hate hearing myself over a microphone, I have to admit that listening to yourself while adjusting your mic volume is vital. That way, you know you're not coming through too quietly or too loudly, and you can get a feel for the audio quality, too. Windows has had this feature for a while now, but unfortunately, KDE Plasma won't let you. 🔗 Source: https://www.xda-developers.com/kde-plasma-67-will-finally-fix-the-most-annoying-part-of-tweaking-your-microphone-volume/ #kde#plasma

Hashtags

Linuxgram 🐧

@linuxgram · Post #18133 · 21.03.2026 г., 14:56

📰 Upcoming KDE Plasma 6.7 Adds Time Zone Offsets and Desktop Type-Ahead KDE Plasma 6.7 will introduce time zone offsets in the clock and a new type-ahead desktop navigation feature for faster file access. 🔗 Source: https://linuxiac.com/upcoming-kde-plasma-6-7-adds-time-zone-offsets/ #plasma#kde

Hashtags

Linuxgram 🐧

@linuxgram · Post #18070 · 16.03.2026 г., 07:10

📰 AppGrid Introduces a New Grid-Based Application Launcher for KDE Plasma 6 AppGrid is a new launcher applet for KDE Plasma 6 that introduces a fullscreen grid-style application menu inspired by macOS Launchpad and COSMIC. 🔗 Source: https://linuxiac.com/appgrid-introduces-a-new-grid-based-application-launcher-for-kde-plasma-6/ #kde#plasma

Hashtags

Linuxgram 🐧

@linuxgram · Post #18061 · 14.03.2026 г., 19:14

📰 KDE Plasma 6.7 Set to Bring Press-and-Hold Character Input Feature KDE developers are preparing Plasma 6.7, introducing a press-and-hold typing feature, enhanced widgets, and support for installing sound themes. 🔗 Source: https://linuxiac.com/kde-plasma-6-7-set-to-bring-press-and-hold-character-input-feature/ #plasma#kde

Hashtags

ПретходнаСтраница 1 од 5Следна