TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #281 · 18 авг.

Что-то вы гоните насчет "привычного вида формата 755 и 644". Я вот вообще не понял что это!😳 Действительно, что означают цифры которые мы получили в прошлом посте? Это кодировка, заключающая в себе режимы доступа к файлу. Подробней можно почитать в статье про chmod. Там можно увидеть альтернативное обозначение того же самого с помощью символов r w x, что значит чтение, запись, исполнение. Чтобы преобразовать восьмеричное число в такое обозначение в Python есть готовая функция >>> stat.filemode(0o755) '?rwxr-xr-x' Мы видим 3 группы по 3 символа, дающие 3 типа доступа для 3 типов юзеров. А что за знак вопроса в начале? Давайте передадим в эту функцию необрезанное значение от os.stat >>> stat.filemode(os.stat(path).st_mode) 'drwxr-xr-x' Это данные, которые мы безжалостно обрезали в прошлый раз😼 Первый символ обозначает тип объекта. Это может быть файл (-), директория (d) или симлинк (l). Вот простая схема данной кодировки [1][3][3][3] │ │ │ │ │ │ │ └──> Others Permissions │ │ └─────> Group Permissions │ └────────> Owner Permissions └───────────> File Type (разверните экран если вы с телефона) Если вы попробуете получить пермишены для симлинка то получите пермишены для файла >>> path = '.venv/bin/python3' >>> stat.filemode(os.stat(path).st_mode) '-rwxr-xr-x' Чтобы получить свойства именно симлинка, нужно это явно указать >>> stat.filemode(os.stat(path, follow_symlinks=False).st_mode) 'lrwxrwxrwx' #tricks#basic

Резултати

Пронајдени 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