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

Резултати

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

Пребарај: #beirut

当前筛选 #beirut清除筛选
Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3713 · 24.11.2024 г., 11:23

Hezbollah missiles falling on Tel Aviv at 1:00 pm in retaliation to the massacres committed against Lebanese civilians in the heart of the Lebanese capital #Beirut.

Hashtags

Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3698 · 23.11.2024 г., 02:35

Footage from the massacre committed by the Zionist enemy on a building on Fathalla Street in the heart of the capital #Beirut Packed..i mean PACKED with residents and displaced people.

Hashtags

Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3695 · 22.11.2024 г., 22:38

It’s past midnight in #Beirut, and our "shelter" homes in the capital trembled as if there were no tomorrow—courtesy of the terrorist entity, Israel. Location: Chiyah area, Beirut, Lebanon.

Hashtags

Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3652 · 17.11.2024 г., 07:12

Under the world’s complicit silence, Israel continues to flatten clearly residential areas in #Beirut’s southern suburbs. These aren’t military targets. They’re homes. Lives. Futures. This is no accident; it’s a calculated erasure, making sure families have nothing to return to, even if the war ends. This was at 8:00 am today.

Hashtags

Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3601 · 09.11.2024 г., 07:42

Another night of terror unfolded in #Beirut as Lebanese civilians endured relentless attacks, targeted by vile Zionist tereorists wielding U.S.-made weapons.

Hashtags

Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3442 · 11.10.2024 г., 05:09

Qassem writes about saving this baby in last night's attack by Zionist Israel on the central #Beirut: "This child was lying right here, on the remaining piece of the ceiling. When I reached him, I couldn't believe he could still be alive. But when I saw his eyes looking up at me, and how he grabbed onto me, completely in shock, I didn't know what to feel. This child will grow up, and with him, so will the hatred for this savage entity."

Hashtags

Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3313 · 22.09.2024 г., 15:39

The death toll from the Zionist aggression on the southern suburbs of #Beirut has risen to 51, following the recovery of another martyr's body. Ten people are still missing as search and rescue operations continue. Toll provided on 6:30 pm Beirut local time.

Hashtags

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