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

Резултати

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

Пребарај: #odoo

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

@githubtrending · Post #14646 · 30.04.2025 г., 11:30

#python#erp#hacktoberfest#odoo#python These tools are for Odoo administrators to improve technical features. They include modules like **attachment queue**, **auto backup**, and **audit log**, which help manage files, secure data, and track changes. Other modules like **sentry** and **server action logging** help monitor errors and server actions. These tools make Odoo more efficient and easier to manage, providing benefits like better data security and improved system performance. https://github.com/OCA/server-tools

GitHub Trends

@githubtrending · Post #15378 · 31.12.2025 г., 11:30

#javascript#erp#hacktoberfest#odoo#python OCA/web offers 40+ free addons for Odoo 18 web interface, like dark mode, responsive design, custom calendars, notifications, charts, and tree view improvements with maintainers listed. All pass pre-commit, build, and translation checks, licensed AGPL-3.0 or per module. You gain easy UI enhancements to customize Odoo backend faster, boost usability on mobile/touchscreens, save time on exports/filters, and improve productivity without coding from scratch. https://github.com/OCA/web

GitHub Trends

@githubtrending · Post #14951 · 12.07.2025 г., 12:00

#python#apps#business#erp#management#odoo#odoo_apps#python Odoo is a powerful, open-source business software that combines many tools like CRM, website building, eCommerce, inventory, accounting, and more into one easy-to-use platform. You can pick and choose only the apps you need, making it flexible and cost-effective. It helps you manage all parts of your business in one place, improving efficiency, reducing errors, and giving you real-time data for better decisions. Its user-friendly design means your team can learn it quickly, and it grows with your business as you add more features. This saves you time, cuts costs, and boosts productivity. https://github.com/odoo/odoo