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

Пребарај: #tongochi

当前筛选 #tongochi清除筛选
Tongochi channel

@tongochi_game · Post #389 · 08.01.2024 г., 19:09

🔍 We are looking for 4 people to join the Tongochi Ambassador program. We are seeking ambassadors who are skilled and passionate about creating content on social media in the following languages: - Russian - English - Spanish - Korean - Chinese - Persian - Turkish - Bahasa If you have been playing Tongochi for some time, know what developer coupons are, understand how our staking works, and are willing to create content on YOUR TG channel or Twitter account (preferably if you already manage an account), and if you also want to receive payment in $PET, then you are exactly who we need 😁 Here's how to become an ambassador: - Publish a post about Tongochi on your account with the hashtags #tongochi#PET. - Share the link to your post in the comments below this post (the one you are reading). - At the end of the week, we will contact the winners. What kind of content you can create: - Videos (long, short) - Text posts - Memes - Video memes - Video tutorials - Art This is all part of our preparation for listing on an exchange, and we need the help of ambassadors. Make Tongochi Great For Ever 🍷

Tongochi Game Juego P2E basado en Telegram chatbot ❇️ Cría la mascota ❇️ Participa en batallas ❇️ Recolecta ítems y cajas comunes y épicas ❇️ Compra y vende en el market place ❇️ Gana NFTs y Tokens PET, TON... Comienza a jugar pulsando aquí #tongochi#PET