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

Резултати

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

Пребарај: #grantproject

当前筛选 #grantproject清除筛选
EKOLOG.UZ| ENG

@ekologuzenglish · Post #11363 · 28.01.2026 г., 15:59

🌿 Environmental Corruption Training Launched in Nukus As part of the social project “Enhancing the Knowledge and Capacity of Journalists, Bloggers, and Civil Society Representatives in Combating Environmental Corruption”, implemented by the “Ekolog” Public Association, the latest training session was held in Nukus city. This project is carried out with a grant from the Public Fund for Supporting Civil Society Institutions under the Oliy Majlis of the Republic of Uzbekistan. 📍 The training took place in the meeting hall of the CSO House in Nukus. 👩‍🏫 Trainers included Nargis Qosimova, Director of the “Ekolog” Public Association, and Feruzbek Sayfullayev, the organization’s press secretary. 🗣 During the training, participants discussed key topics, including: — “What is environmental corruption?” — “How does it develop?” — “The links between environmental problems in Uzbekistan and corruption” The sessions were interactive, giving participants practical knowledge on how to identify and report environmental corruption, as well as understanding the role of media and civil society in combating it. ☘️ Follow the latest environmental news on our page: @ekologuz. 💬 Send your suggestions and feedback via @eklguz_bot! ☘️Read the latest environmental news on the @ekologuz page. Follow us and send your suggestions and wishes via @eklguz_bot Instagram | Facebook | Twitter | Sayt | Youtube. #Ekolog#EnvironmentalCorruption #Nukus#CivilSociety#Journalists #Bloggers#Environment#GrantProject