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

Пребарај: #airdropalert

当前筛选 #airdropalert清除筛选
Airdrop Presents 🗽

@airdrop_presents · Post #2900 · 10.05.2024 г., 11:14

🎁 Exciting New Research for Our Community! ✍️ 🔥 Get Ready for an Exclusive Airdrop Campaign in partnership with Binance Web3 Wallet! 🌐 We're giving away a whopping 1M $ZKL tokens! 💰 ↪️Tasks are now LIVE: ↪️ Deposit to Nova ↪️ Deposit ETH to LayerBank ↪️ Swap on iZiSwap (minimum 5 $USDT) ↪️ Supply tokens on Aqua Don't miss this incredible opportunity! Join now to claim your share of the rewards! 💫🔥#Crypto#Airdrop#Blockchain ➡️Click here to participate: https://www.binance.com/en/activity/mission/zklink-nova-airdrop🚀 🌟 Hurry! This giveaway is valued at a staggering 3.5 million dollars! 🤑 Big news: Potential Binance listing on the horizon! ✔️🐰 🔶 OTC Price: 1-3💸 Check it out here: Link🐋#ZKL#AirdropAlert

Airdrop Gold : Crypto Airdrop

@airdropgoldchannel · Post #157247 · 22.07.2024 г., 09:39

🚀 Don't Miss Out on Blum Points! 🚀 Hey there! 👋 Have you heard about Blum? It's the hottest airdrop around, and rumor has it that it might even replace $NOT! 🔥 Blum points are super hard to get, but guess what? By joining our exclusive Blum SQUAD, you can easily rack up more Blum points! 🎉✨ Don't let this opportunity slip away – join us now and be part of the excitement! 🌟 👇👇👇 CLICK HERE TO JOIN CLICK HERE TO JOIN CLICK HERE TO JOIN #BlumTribe#AirdropAlert#CryptoFOMO#BLUM $BLUM

SingSing Announcement

@singsingchannel · Post #904 · 16.10.2024 г., 14:10

🚨 Leaderboard Update: Tycoon Master Showdown 🚨 The leaderboard is heating up as players race for those top spots! 💰 Who's ready to claim their share of $KARA and those sweet NFT + TON bonuses? 🎁 There’s still time to make your move, so don’t let up! 🏆 👀 Oh, and did we mention a big airdrop is coming soon? Keep those eyes peeled—something massive is on the horizon! 🌟 #TycoonMaster#AirdropAlert#KARA#NFT#SingSingShowdown 🎤Announcement | Chat | X (Twitter) | Website | Game