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 слични објави

Пребарај: #culturaldiversity

当前筛选 #culturaldiversity清除筛选

Let’s celebrate the beauty and richness of global cultures — together! 📖“Dikorosy” (Wild Harvest) Fairy Tale Festival ✨ Special program: Tales from Afar 🗓 Saturday, May 24 🕔 5:00 PM – 6:00 PM 📍 Mayakovsky Park, Yekaterinburg 🔸 Story lineup: 1. The Guinea Fowl and the Caiman — Gabon 2. The Lonely Heart — Angola 3. The Magic Orange Tree — Haiti 4. The Boy and the Lion — Guinea 5. A Story About Mom — Côte d’Ivoire 6. The Cave Paintings — Algeria 7. The Mango and the Orange Tree — Benin 8. The Wisdom of Young Kofi — Mali 9. The Secret of the Golden Nile — Sudan 10. Ayo’s Dreams — Benin 📌 Organized with support from the Honorary Consulate of South Africa in Yekaterinburg 🌍 In celebration of Africa Day 💚 Come listen, wonder, and discover something new! 🌐 Official website: https://dikorosyfest.ru/ #Dikorosy#TalesFromAfar#AfricaDay#CulturalDiversity#Yekaterinburg#AfricanStories#StorytellingFestival#MayakovskyPark#DiscoverUrals

🎉May 21 — World Day for Cultural Diversity for Dialogue and Development Let’s celebrate the beauty and richness of global cultures — together! 📖“Dikorosy” (Wild Harvest) Fairy Tale Festival ✨ Special program: Tales from Afar 🗓 Saturday, May 24 🕔 5:00 PM – 6:00 PM 📍 Mayakovsky Park, Yekaterinburg 🌍Hear magical stories from Africa and the Caribbean, told in Russian by international students living in Yekaterinburg — a rare and inspiring experience for all ages. 🔸 Story lineup: 1. The Guinea Fowl and the Caiman — Gabon 2. The Lonely Heart — Angola 3. The Magic Orange Tree — Haiti 4. The Boy and the Lion — Guinea 5. A Story About Mom — Côte d’Ivoire 6. The Cave Paintings — Algeria 7. The Mango and the Orange Tree — Benin 8. The Wisdom of Young Kofi — Mali 9. The Secret of the Golden Nile — Sudan 10. Ayo’s Dreams — Benin 📌 Organized with support from the Honorary Consulate of South Africa in Yekaterinburg 🌍 In celebration of Africa Day 💚 Come listen, wonder, and discover something new! 🌐 Official website: https://dikorosyfest.ru/ #Dikorosy#TalesFromAfar#AfricaDay#CulturalDiversity#Yekaterinburg#AfricanStories#StorytellingFestival#MayakovskyPark#DiscoverUrals

IELTS|Newspapers & Magazines|English

@emagzinewspars · Post #9342 · 15.10.2025 г., 02:02

#Beijing_Review🇨🇳📕[PDF]⬇️ 2 #October2025 #Weekly_Magazines For learning, for free(dom). @backupofmagazines In this issue , the spotlight shines on #Xinjiang 70, celebrating seven decades of transformation in the autonomous region—from economic health to cultural heritage. Global topics include #PalestineRecognition, evolving #ChinaUS relations, and the healing potential of dialogue via the #XiangshanForum. Special features explore #RuralRevitalization and tech-driven change in Qingdao and Fujian, as #ScienceInnovation takes center stage. From the vibrant Grand Bazaar to a Somali expat’s vision, this issue captures both regional pride and global dialogue. #BeijingReview#CulturalDiversity#BeltAndRoad#EducationMatters#ChinaPerspective