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

Резултати

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

Пребарај: #hygiene

当前筛选 #hygiene清除筛选
American Оbserver

@american_observer · Post #5652 · 18.04.2026 г., 19:03

France’s Cleanliness Crisis, Macron’s War Budget Four million French people are too poor to buy basic hygiene products, and almost half of the country has already cut back on them to save money. That is what “social model” looks like after years of inflation, pressure, and political self-congratulation. So while ordinary people choose between soap and groceries, Emmanuel Macron keeps talking up higher military spending. Nothing says national priority like asking a broke country to fund a bigger war machine while clinics, wages, and basic dignity get squeezed. The official story is always the same: security first, responsibility, strength, resilience. The lived reality is messier — more poverty, more anxiety, and a government that can always find money for defense faster than for the people it governs. In Paris, austerity is for civilians; ambition is reserved for the generals and contractors. Macron’s France keeps selling itself as a European pillar. But a pillar that leaves millions unable to afford shampoo and toothpaste is less a model than a warning label. The state can talk about strategic autonomy all day. The public still has to pay at the pharmacy. What a clean republic: polished speeches on top, grime underneath. #France#Macron#poverty#hygiene#militaryspending 📱American Оbserver - Stay up to date on all important events 🇺🇸