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

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

iOS优质应用

@ioskk · Post #4214 · 18.09.2025 г., 15:04

🧭#优质应用 📂软件名称:iCloud Photos Downloader 🍏支持平台:#Windows#macOS#Linux 📊软件价格:免费 🪟软件简介:一款iCloud照片下载器,用于从iCloud中下载照片。可以通过直接下载可执行文件或使用各种包管理器(如Docker、PyPI、AUR和npm)来安装和使用该工具。 主要功能包括三种操作模式:复制(默认模式,下载新照片)、同步(下载新照片并删除iCloud中已删除的本地文件)和移动(下载新照片并删除iCloud中的照片)。 🕸软件下载:点击下载 🚀频道💬群聊📭投稿🛃商务

Linuxgram 🐧

@linuxgram · Post #18723 · 09.05.2026 г., 16:45

📰 Linux Foundation Launches Open Driver Initiative to Strengthen Hardware Support Across Linux by George WhittakerThe Linux Foundation has announced a new Open Driver Initiative, a collaborative effort aimed at improving the development, maintenance, and long-term sustainability of open-source hardware drivers across the Linux ecosystem.The initiative reflects growing demand for better hardware compatibility in areas ranging from desktops and gaming systems to cloud infrastructure, automotive platforms, AI hardware, and next-generation... 🔗 Source: https://www.linuxjournal.com/content/linux-foundation-launches-open-driver-initiative-strengthen-hardware-support-across-linux #linux#opensource

Linuxgram 🐧

@linuxgram · Post #18641 · 01.05.2026 г., 11:08

📰 Shotcut 26.4 Video Editor Adds Vulkan GPU to Speech to Text on Linux Shotcut 26.4 open-source video editor is now available for download with Vulkan GPU support for Speech to Text on Linux, 10-bit VP9 MP4 (E-AC-3) and 10-bit VP9 WebM (Opus) export presets, and more. 🔗 Source: https://9to5linux.com/shotcut-26-4-video-editor-adds-vulkan-gpu-to-speech-to-text-on-linux #linux#opensource

Linuxgram 🐧

@linuxgram · Post #18612 · 29.04.2026 г., 11:45

📰 The ps5-linux project can turn some PlayStation 5 consoles into a Linux gaming machine The open source ps5-linux project has been released, allowing you to turn a PlayStation 5 into a fully fledged Linux gaming machine.Read the full article on GamingOnLinux. 🔗 Source: https://www.gamingonlinux.com/2026/04/the-ps5-linux-project-can-turn-some-playstation-5-consoles-into-a-linux-gaming-machine/ #linux#opensource

Linuxgram 🐧

@linuxgram · Post #18609 · 29.04.2026 г., 06:00

📰 Thunderbird 150 Lands on Linux: Smarter Encryption, Better Tools, and a Polished Experience by George WhittakerMozilla has officially rolled out Thunderbird 150.0, the latest version of its open-source email client, bringing a mix of security-focused enhancements, usability upgrades, and workflow improvements for Linux and other platforms. Released in April 2026, this update continues Thunderbird’s steady evolution as a powerful desktop email solution. 🔗 Source: https://www.linuxjournal.com/content/thunderbird-150-lands-linux-smarter-encryption-better-tools-and-polished-experience #linux#opensource

Linuxgram 🐧

@linuxgram · Post #18582 · 27.04.2026 г., 09:54

📰Linux GPU tool (LACT) gets a new UI and a NVIDIA Voltage-Frequency Curve Editor The popular open source app, Linux GPU Configuration And Monitoring Tool (LACT), has a huge new release out now with a brand new UI and major new features.Read the full article on GamingOnLinux. 🔗 Source: https://www.gamingonlinux.com/2026/04/linux-gpu-tool-lact-gets-a-new-ui-and-a-nvidia-voltage-frequency-curve-editor/ #linux#opensource

Linuxgram 🐧

@linuxgram · Post #18552 · 24.04.2026 г., 06:47

📰 HDMI FRL Support Achieved With Open-Source Nouveau For NVIDIA GPUs While the AMDGPU open-source driver has struggled with HDMI 2.1 support due to the HDMI Forum blocking open-source implementations, HDMI Fixed Rate Link (FRL) as a feature of the HDMI 2.1 specification is enjoying success now with the open-source Nouveau graphics driver on Linux for NVIDIA GPUs... 🔗 Source: https://www.phoronix.com/news/HDMI-FRL-On-Nouveau-Linux #linux#opensource

Linuxgram 🐧

@linuxgram · Post #18534 · 22.04.2026 г., 18:29

📰 Linux may get a hall pass from one state age-check bill, but Congress plays hall monitor Colorado amendments could exempt open source OSes, code repos, and containers The prospect of OS-level age checks applying to open source systems is a serious concern for FOSS advocates. Campaigners appear to have secured proposed exemptions for open source operating systems, code repositories, and containers in one US state, but stricter federal legislation has already been introduced in Congress.… 🔗 Source: https://go.theregister.com/feed/www.theregister.com/2026/04/22/linux_us_state_age_verificaiton_laws/ #linux#opensource

Linuxgram 🐧

@linuxgram · Post #18507 · 21.04.2026 г., 13:45

📰 CoolerControl 4.2 adds auto detection of new devices, stress-testing and more The open-source app for monitoring and controlling supported cooling devices on Linux, CoolerControl, has a big new release out with major new features.Read the full article on GamingOnLinux. 🔗 Source: https://www.gamingonlinux.com/2026/04/coolercontrol-4-2-adds-auto-detection-of-new-devices-stress-testing-and-more/ #linux#opensource

Linuxgram 🐧

@linuxgram · Post #18420 · 13.04.2026 г., 19:20

📰 Fake Linux leader using Slack to con devs into giving up their secrets Google Sites lure leads to bogus root certificate Imagine getting asked to do something by a person in authority. An unknown malware slinger targeting open source software developers via Slack impersonated a real Linux Foundation official and used pages hosted on Google.com to steal developers' credentials and take over their systems.… 🔗 Source: https://go.theregister.com/feed/www.theregister.com/2026/04/13/linux_foundation_social_engineering/ #linux#opensource

Linuxgram 🐧

@linuxgram · Post #18412 · 13.04.2026 г., 12:25

📰Mainline video capture and camera support for Rockchip RK3588 After over five years of development and collaboration across the Open Source community, mainline Linux support for Rockchip RK3588's video capture hardware has finally landed. 🔗 Source: https://www.collabora.com/news-and-blog/news-and-events/mainline-video-capture-and-camera-support-for-rockchip-rk3588.html #linux#opensource

Linuxgram 🐧

@linuxgram · Post #18307 · 04.04.2026 г., 06:48

📰 Skyscraper brings Bluesky to the Linux terminal What’s better than using a social network? Not using one, I suppose. Or using one in the nerdiest way you can. Case in point, Skyscraper. Created by developer Cameron Banga, Skyscraper is an open-source terminal client for Bluesky, written in Rust and available on GitHub. It does the core essentials – timeline browsing, posting, replies, reposts, likes and profile viewing. 🔗 Source: https://www.omgubuntu.co.uk/2026/04/skyscraper-bluesky-terminal-client-linux #linux#opensource

12•••4748495051•••100•••121122
ПретходнаСтраница 49 од 122Следна