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

Резултати

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

Пребарај: #referandearn

当前筛选 #referandearn清除筛选
MoonPlay

@moonplay_official · Post #34 · 20.06.2024 г., 15:38

Invite Your Friends To Join the Lunar Odyssey🧑‍🚀 Our mission to the moon is just getting started, and we need more brave souls like you! Invite your friends🔊 to join the adventure and help build our lunar colony. The more crew members we have, the stronger our efforts and the greater our discoveries. Every friend you bring on board not only boosts our mission but also unlocks rewards and opportunities for you: 💰one-time bonus; 👛% of space bucks mined by a friend as long as they play (even after the expedition you hire them for); 🤗crew members purchase (different members require different number of friends invited); each hired member will be earning you extra SB/hour. Remember that you need full crew to set off to the moon! Go to Crew tab -> Refer & Earn🔗, share your referral link, and let's make history together! P.S. Just in case you’d run out of friends to invite, there are specially trained bots🤖ready to step in. Nothing can stop you on the way to the moon! Stellar adventures start here:@moon_land_bot🚀 Website | Telegram Chat | X | Discord | Medium #ToTheMoon#MoonPlay#ecosystem#blockchain#gamefi#web3#wenlisting#airdropsoon#communityfirst#taptap#clicker#game#invitefriends#referralreward#referandearn

Bounty Hunters 💎

@trustedairdropsss · Post #374 · 10.12.2020 г., 11:56

Want to win big? Invite your friends to join 11Wickets & get rewarded! Download the app👉https://11wickets.sng.link/Dfcpe/ljeu . . . #11Wickets#IndiaOnTheGo#FantasyFootball#FantasySports#Football#ReferAndEarn#Refer#ReferYourFriends

Bounty Hunters 💎

@trustedairdropsss · Post #513 · 14.01.2021 г., 07:53

Want to win big? Invite your friends to join Rummy24 & get rewarded! (T&C apply). Download the app👉https://rummy24.sng.link/Averc/fcz2/lcft . . . #Rummy24#RummyApp#Rummy#RummyGame#IndianRummy#ReferAndEarn#ReferFriends#Invite#Earn#Rewards#Inviteyourfriends#EarnCash#Referafriend#EarnMoney#EarnMoneyOnline#Games#CardGames#DownloadTheApp