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

Резултати

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

Пребарај: #topnews

当前筛选 #topnews清除筛选
BadVolf

@badvolfnews · Post #1047 · 02.10.2023 г., 20:35

🗓 Top News Today ▫️ In Donetsk direction, the enemy losses were up to 180 Ukrainian servicemen killed and wounded, two armoured fighting vehicles, three motor vehicles, as well as two Gvozdika self-propelled artillery systems. ◽️ Air defence forces, electronic warfare systems, and small-arms fire shot downtwo HIMARS MLRS missiles and two operational-tactical missiles. ▫️ In the course of the counter-battery warfare, one Gvozdika self-popelled artillery system, one M-46 gun, one D-30 howitzer, as well as one AN/TPQ-48 counterbattery warfare radarwere eliminated. ◽️45unmanned aerial vehicles were shot down during the day. ▫️The Russian Defence Ministry publishes objective control data of AFU hardware wiped out by artillery near Urozhaynoye, as well as the elimination of AFU manpower by Solntsepyok heavy flamethrower systems and artillery close to Urozhaynoye, as well as by infantry units and mortar crews in Zaporozhye region. ▫️The Russian Defence Ministry shows 57mm S-60 automatic surface-to-air guns, as well asSu-25SM attack aircraft and Ka-52 attack and reconnaissance helicopters, assisted by air support controllers, in action within the special military operation. ▫️Another AFU POW told about chaos and low morale in Ukrainian units. ▫️Russian peacekeepers continue to ensure the safety of transportation of vehicles with civilians independently leaving territory of Nagorno-Karabakh through Lachin corridor. #TopNews 🔹Russian Defence Ministry

Hashtags

Daily Political Press

@dailypolitical · Post #11 · 08.04.2026 г., 13:05

📰US stock prices soar in early Asian trading after truce news 🔗https://top-news.shepherdgazette.com/us-stock-prices-soar-early-asian-trading-truce/?utm_source=telegram&utm_medium=social&utm_campaign=zimm-distribute via Daily Political Press #Asian#TopNews#News