Что-то вы гоните насчет "привычного вида формата 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
🎉 Microsoft Community Conf 2025 is here!
Microsoft Developers Community in Uzbekistan (MDC Uzbekistan) is a vibrant network of developers, engineers, and tech enthusiasts passionate about Microsoft technologies. We organize meetups, workshops, and large-scale events to empower the local tech ecosystem and connect innovators across Uzbekistan.
📢 About the conference:
Our flagship event, Microsoft Community Conf 2025, brings together tech enthusiasts from all over Central Asia! Explore the latest in AI, .NET, Cloud, DevOps, Data, and more through inspiring keynotes and hands-on sessions with industry experts.
📅 Date: November 22, 2025
📍 Location: Palace of Youth Creativity, Tashkent
🏢 Company Corners:
Meet representatives from EPAM, BRB-TECH, IMAN, and other leading companies. Network, showcase your skills, and discover new opportunities.
💼 Bring your CV – your next big opportunity could be waiting for you!
✅ Secure your spot: Register Now
#MDCUConf2025#MicrosoftUzbekistan
Telegram | Instagram | Website
Exciting Announcement: The Tech Joined Us as a Media Partner!
We are proud to welcome The Tech as an official media partner of the MDC Uzbekistan. This partnership marks the beginning of an exciting collaboration to support all our initiatives, including hackathons, conferences, and other key events.
With The Tech’s support, we’re set to expand our reach and inspire even more developers across Central Asia. Together, we’ll continue building a stronger tech community!
#MicrosoftDevelopersCommunity#TheTech#MediaPartner#TechEvents#MicrosoftUzbekistan
@mdcuzbekistan
🌟 Call for Sponsors — MDCU Conf 2025
We’re thrilled to announce that MDCU Conf 2025 is almost here! 🎉
As we bring together developers, IT professionals, and tech leaders from across the region, we’re inviting organizations and brands to join us as official sponsors of this exciting event. 🚀
💡 Why sponsor?
- Connect with hundreds of developers and decision-makers
- Increase brand visibility within the Microsoft ecosystem
- Build lasting relationships with the local and regional tech community
- Showcase your innovations through booths, talks, and demos
📅 Event Date: November 22, 2025
📍 Location: Palace of Youth Creativity, Tashkent
✨ Let’s collaborate to empower innovation and grow the tech community in Uzbekistan!
👉 Interested in sponsoring? Reach out to @dotnetgo or @g_voriskhon
#MDCUConf2025#MicrosoftUzbekistan#TechConference#Sponsorship#DeveloperCommunity#Innovation
Telegram | Instagram | Website