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

Пребарај: #theparallel

当前筛选 #theparallel清除筛选

🎙Long waited testnet for Parallel is ON🔥🔥🔥 🎮TESTNET FOUNDATION GAME: PARAGON CRAFTING🎮 ➧REGISTER NOW! ⚖️Requirement: Have at least 1000 PRL in Wallet BUY NOW: https://poocoin.app/tokens/0xd07e82440a395f3f3551b42da9210cd1ef4f8b24 👉Registration Form: https://prl.onl/testnetform ⏰Registration Open: Jan 6, 2022 - Jan 10, 2022 ⏰Valid Wallet Scan: 13:00 UTC on Jan 10, 2022 #TheParallel#Metaverse#PRL

🔥🔥🔥ARE YOU READY? JUST 20 minutes LEFT There is nothing more excited than waiting for the Super Listing Event from The Parallel at the moment. Do not miss us! Set your alarm at 13:00 UTC right now, Parallese. Events on the Super Listing Event you should pay attention!! 👉 SQuizz Game on Livestream 🎁 20,000 PRL for the 200 people have the highest score Step 1: Log in to your MetaMask wallet address at theparallel.io Step 2: Follow the Super Listing event and wait for the questions to appear randomly throughout event time (15 questions in total) Step 3: Answer the questions at theparallel.io 👉 Share NOW - Earn NOW - 🎁 20,000 PRL for 1,000 fastest Parallese sharing and $1000 for 1 luckiest one Step 1: Share the Livestream on Facebook or Twitter with the hashtag #TheParallel#Super_Listing_Event#Metaverse#PRL Step 2: Tag 5 of your friends in the comment section Step 3: Enter the link of your sharing post and your wallet address at: https://t.me/prlsharenowbot 📌 Listing time: Revealed in the Livestream. You must watch the full live stream to find out 🔐 PRL smart contract address: 0xd07e82440A395f3F3551b42dA9210CD1Ef4f8B24 1️⃣ Install BEP-20 Wallet (Metamask) 2️⃣ Adding PRL smart contract before Listing will help shorten transaction time and increase fair competition with bots. 3️⃣ Prepare BUSD, BNB in your wallet and approve BUSD in PancakeSwap 📎 Find out details at: https://prl.onl/3FqvCrh

🎙The Parallel - An Infinite Metaverse announcement🔥🔥 The Parallel - An Infinite Metaverse@theparallel_io Feb 23👑 Check Out Rune Hunter: Ascension! First game launched by The Parallel Metaverse 👉Read the game guide! We want your first impressions and thoughts! 👉Checkout Ascension NOW:https://prl.onl/3LU3xfv ⏰ ETA: Mid March Testnet #Gamefi#playtoearn$PRL #PRL#theparallel#Ascension