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

Пребарај: #financialliteracy

当前筛选 #financialliteracy清除筛选
KATM

@katm_kredit_byurosi · Post #324 · 03.10.2025 г., 07:02

😎 🥳 🤦 📈“KATM” Kredit byurosi ma’lumotlar bazasiga ko’ra O'zbekiston Respublikasi bo'ylab "Eng ommabop kredit mahsulotlari" bo'yicha INFOGRAFIKA📊 #KATM#CreditBureau#TopCreditProducts #CreditTrends#FinancialLiteracy#Uzbekistan 🔘Bizni ijtimoiy tarmoqlarda kuzatib boring! 🌐Website🚀Telegram🔵Facebook 📷Instagram🎬Youtube🎰Linkedin

🐓✨Tencent PP Ranch✨

@tencentppranch012 · Post #223 · 22.10.2024 г., 10:10

👑Ad Promo: Tuesday Chicken Farm Extravaganza🐔 💎Hey there, future “Chicken Tycoons”! Tuesday is here—have you successfully expanded your chicken farm? Is this week’s revenue starting to roll in? If not, it’s time to step up your game! 🛠 ✨ 💎Did you know? Here, you can not only raise chickens for profit but also invite your friends to join the fun and make money together! Generate your exclusive link and let the good times roll—every time you invite a friend, you’ll earn sparkling diamond rewards! 💎 💎And guess what? Diamonds convert to dollars at a 1:1 rate! That means every diamond is a direct boost to your wealth—think about it, the money you earn can go towards anything you desire, or even a spontaneous trip around the world! ✈️😄 💎o, get ready to generate your exclusive link and let’s leverage the joy of chicken farming to unlock financial freedom on this amazing journey!🐓🌍💸 💎Expand your farm, invite friends, and be a winner!🚀🎉 Let’s enjoy the fun of raising chickens this Tuesday while racking up wealth! You've got this! 💪😄 #FinancialLiteracy#Education#LearnToInvest#Community#Networking#Collaboration#Entrepreneurship#Startups#VentureCapital#GrowthHacking#ContentMarketing 🎮 Game Assistant 🤖Game Bot ⌨Discussion Group🤩VIP Channel 🪙 Join the Game Now