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

Пребарај: #parisblockchainweek

当前筛选 #parisblockchainweek清除筛选
TONlines – News

@tonlines · Post #6769 · 14.04.2025 г., 20:23

STON.fi Showcases Omniston at Paris Blockchain Week #Omniston#ParisBlockchainWeek STON.fi participated in three key events during Paris Blockchain Week, highlighting their Omniston project. This decentralized liquidity aggregation protocol, built for the TON blockchain, was presented at both the TON Builders Matchup and RedStone France meetup. Source: link @tonlines

DWF Labs Broadcast

@DWFLabs · Post #1120 · 08.04.2025 г., 11:41

Bonjour! We're here at Paris Blockchain Week🇫🇷 If you’re at the event, don’t miss the chance to say hi to Karyna Sovich, our Head of Business Development, who’s there! Let's connect 🌍 #PBW2025#ParisBlockchainWeek

Gumart Announcement 🛒

@gumartec · Post #244 · 15.04.2025 г., 07:23

🎬 Gumart is in Paris Blockchain Week 2025 🇫🇷 #GuGoGlobal campaign – a journey to take Gumart around the world and bring Web3 adoption closer to real life! 📍 First Stop: Paris Blockchain Week 2025 Our team just landed in Paris, the heart of innovation and fashion, to showcase Gumart at one of the most prestigious Web3 events in the world! From networking with top-tier founders and VCs to sharing the stage with the best builders in the space, Gumart is here to make waves. 🎥👉 Watch the highlight video from our Paris mission – and feel the energy! 💡We’re on a mission to show the world how Gumart is building the future of crypto payments, e-commerce, and DeFi — one region at a time. Real people. Real places. Real utility. 🚀 Next stop? Maybe your city. Don’t blink 👀 Let’s take Web3 mainstream – together 🌐 #GuGoGlobal#Gumart#PBW2025#Web3Adoption#ParisBlockchainWeek#CryptoInRealLife