Что-то вы гоните насчет "привычного вида формата 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
#Three#rafareborn
模块:eu.hxreborn.tfs
简介:Three Finger Swipe
版本:10029-1.0.2
更新时间:2026/03/19 07:44:34
更新日志:
Changed
Use module name as log tag by @hxreborn
@lsposed_Modules_Updates_Trackers | @lsposed_Geeks_Bot
News: #Ethiopian Airlines to open #three new domestic airports
Ethiopian Airlines has announced plans to inaugurate three new domestic airports in #Negele_Borena, #Gore_Metu, and #Debre_Markos, expanding its internal flight network.
In a statement released yesterday, the airline said the newly built airports are expected to be operational by April 2026, with regular passenger flights scheduled three times weekly to each destination.
The expansion will bring the airline’s total domestic destinations to 26, a move it says is intended to strengthen trade, tourism, and social connectivity across Ethiopia.
Mesfin Tasew, Ethiopian Airlines Group CEO, described the initiative as a milestone for both the airline and the country, highlighting the economic and social benefits of improved air transport access. He said the new routes reflect the airline’s commitment to enhancing domestic connectivity while supporting national development through reliable air transport services.
#typescript#3d#browser_based#cad#geometry#occ#occt#opencascade#three#threejs#wasm#webassembly#webcad
Chili3D is a free, open-source 3D CAD application that you can use directly in your web browser. It allows you to create and edit 3D models without needing to install any software on your computer. You can make basic shapes like boxes and spheres, draw 2D sketches, and perform advanced operations like combining shapes. It also includes tools for precise alignment and measurement. This makes it easy for anyone to design and edit 3D models online, which is helpful for both beginners and experienced users.
https://github.com/xiangechen/chili3d