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

Резултати

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

Пребарај: #customizable

当前筛选 #customizable清除筛选
GitHub Trends

@githubtrending · Post #14937 · 09.07.2025 г., 14:30

#typescript#api#cms#cms_framework#content_management#content_management_system#customizable#dashboard#graphql#hacktoberfest#headless_cms#jamstack#javascript#koa#koa2#mysql#no_code#nodejs#rest#strapi#typescript Strapi is a free, open-source headless content management system that lets you manage content easily and flexibly, whether you host it yourself or use Strapi Cloud. It works with many databases and lets you build custom APIs, routes, and plugins to fit your needs. You can use any frontend technology you like, such as React, Vue, or Angular, and it comes with a modern, customizable admin panel. Strapi is fast, secure, and scalable, making it simple to deliver content across websites, apps, or devices. This means you get full control over your content and how it’s displayed, saving time and effort while keeping your project future-proof[1][2][3]. https://github.com/strapi/strapi

GitHub Trends

@githubtrending · Post #14712 · 16.05.2025 г., 11:30

#php#calendar#contacts#crm#crm_platform#crm_system#customer_portal#customer_support#customizable#documents#email_marketing#kanban#leads#open_source#php#platform#sales_automation#single_page_application#support EspoCRM is a free, open-source CRM tool that helps you manage customer relationships by organizing leads, contacts, sales, marketing, and support in one easy-to-use web app. It has a clean interface, customizable features, and a REST API for integration, making it flexible for startups, small businesses, and developers. It automates repetitive tasks, saving time and reducing errors, while providing detailed reports to improve decision-making. Being open-source, it’s cost-effective with no licensing fees, and supported by a helpful community. This means you get a powerful, adaptable CRM that boosts productivity and customer management without high costs[1][3][5]. https://github.com/espocrm/espocrm