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

Резултати

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

Пребарај: #kg

当前筛选 #kg清除筛选
PT风向旗

@Ptfxq · Post #167 · 05.04.2021 г., 03:57

#KG 对满足条件的用户发放1个邀请。 原文:https://telegra.ph/Invites-for-long-term-seeders-04-05

Hashtags

PT风向旗

@Ptfxq · Post #694 · 02.08.2024 г., 05:41

#KG#PTP PTP在KG开设官窑 要求如下 Members of Karagarga that have an unwarned account that is older than two years, and fulfill at least one of the below requirements, are eligible to request an invite. ▪ At least 50 uploads (25 of which must be movies) ▪ At least 10 completed subtitle pots ▪ VIP or staff tldr: 满足要求你肯定已经进了,没进你也不满足要求,也大概率满足不了要求 感谢群友投稿

Hashtags

PT风向旗

@Ptfxq · Post #375 · 14.10.2022 г., 22:00

#karagarga#KG The Pot The pot system has been functioning well for more than a decade now, big thanks to all subtitlers and pledgers. Please check if you have claimed any pots. Go to your profile, and after Pot Pledges click on (claimed pots). If you are working on a pot, leave a comment there about progress, and update that post at least every 3 months. If not, cancel your claim. A dormant claim can discourage a potential subtitler. Also, please keep an eye from time to time on pots you started or pledged to (see Pot Pledges in your profile). If good subtitles appeared in the meantime, report that pot with a link to the subs. If you want to subtitle a film for which the pot has been claimed long ago without any news, please contact one of us (corvusalbus, flipflink, cyzs, musiclova). Happy subtitling and viewing!

12
ПретходнаСтраница 1 од 2Следна