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

Пребарај: #empower

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

@Dwflabs · Post #125 · 30.12.2022 г., 03:34

We're receiving a stream of good news before the year-end 👀💥 Conflux Network is expanding into Hong Kong and working to accelerate #web3 integration into the traditional internet business and economies 🫡 ▫️Dr. Ming Wu, co-founder of Conflux Network, was invited to Hong Kong to speak with various government and private organizations about the digital economy, innovation and technology, and has reached an initial strategic cooperation intention. ▫️Conflux is currently registering related entities for the entry into Hong Kong, solidifying its role as foundational infrastructure for Web3. ▫️This follows October’s announcement of the “Policy Declaration on the Development of Hong Kong Virtual Assets” which has paved the way for a more hospitable blockchain environment in Hong Kong. We're privileged to be able to support your continuous development and hard work to further #empower and grow tech innovation as well as the larger #Web3 adoption. Read more here.

Venture Village Wall 🦄

@venturevillagewall · Post #3617 · 21.12.2024 г., 10:22

Skynet Raises $1.20M Skynet has successfully raised $1.20 million to enhance its platform, which aims to empower AI agents to connect seamlessly with global resources. For more information, visit Skynet. #Skynet#AI#Funding#Resources#Tech#Innovation#Investment#Global#Agents#Platform#Development#Seamless#Connect#Empower#Industry#Tools

Venture Village Wall 🦄

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

Askable Raises $14.04M Askable has successfully raised $14.04 million as of December 11, 2024, offering a powerful research platform that connects users with top researchers and ideal participants for quick insights and faster decision-making. More details at Askable. #Funding#Research#Insights#Platform#Participants#Decisions#Teams#Technology#Fast#Access#Empower#Global#Data#Analytics#Investments#Startups#Business#Growth#Innovation#Online