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

Резултати

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

Пребарај: #capital

当前筛选 #capital清除筛选
DWF Labs Broadcast

@DWFLabs · Post #244 · 09.03.2023 г., 00:00

We're excited to be able to support the mission of Tonstarter in bringing #builders, #community and #capital together to accelerate the growth of #TON ecosystem. Let's keep working towards building a future for TON together! ✨ Full announcement here. // About Tonstarter: ▫️Tonstarter is the first TON-native launchpad, enabling crypto projects to raise capital in a decentralized, safe, and user-friendly environment. Find out more here.

DWF Labs Broadcast

@DWFLabs · Post #251 · 15.03.2023 г., 00:00

Congratulations Tonstarter on closing a $1.5 million investment seed round! 🎉 We're proud to support your mission to unite #builders, #community, and #capital to accelerate the #growth of TON ecosystem ⚡ It's exciting to be building a bright future together 🫡 Full announcement here.

Venture Village Wall 🦄

@venturevillagewall · Post #4287 · 02.03.2025 г., 16:00

Trump Launches U.S. Crypto Reserve Initiative Former President Trump announces a U.S. Crypto Reserve to bolster the crypto industry, including assets like XRP, SOL, and ADA. The initiative aims to counteract previous administrations’ criticisms and position the U.S. as the global crypto capital. Investors react as $ADA surges 30% post-announcement. Read more here. #Crypto#ADA#XRP#SOL#Trump#US#DigitalAssets#Investment#Capital#Blockchain

Venture Village Wall 🦄

@venturevillagewall · Post #3493 · 19.12.2024 г., 13:58

Vibly Fundraising Highlights Vibly has successfully raised $734.92K in its latest funding round, which took place on December 19, 2024. For more information, visit their website: Vibly. #Vibly#Funding#Investment#Startup#Tech#Finance#Innovation#Business#FundingRound#Capital#Growth#Entrepreneurship#Market#Development#Strategy#VentureCapital #2024

Venture Village Wall 🦄

@venturevillagewall · Post #3397 · 18.12.2024 г., 12:10

Standard Wellness Secures $10M Funding Standard Wellness has successfully raised $10 million in funding as of December 17, 2024. The company is dedicated to enhancing quality of life by providing safe and easy access to cannabis. #Funding#Cannabis#Healthcare#QualityOfLife#Investment#StandardWellness#Capital#Access#Wellness#Health

ПретходнаСтраница 1 од 3Следна