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

Пребарај: #akobo

当前筛选 #akobo清除筛选
Addis Standard

@addisstandardeng · Post #21646 · 09.03.2026 г., 06:50

Thousands flee #Akobo after #South_Sudan army issues forced evacuation order Thousands of civilians have fled an opposition stronghold in eastern South Sudan after the army ordered evacuations to clear the way for a military offensive, the latest sign that the country’s fragile peace is unravelling, as fears of a return to all-out civil war haunt the world’s youngest nation. The town of Akobo, near the #Ethiopian border, was almost completely emptied by Sunday after the South Sudan People’s Defense Forces issued an ultimatum on Friday demanding that civilians, aid workers and United Nations peacekeepers leave ahead of a planned assault. “The town is now almost empty,” said Nhial Lew, a local humanitarian official. “Women, children and the elderly have left and crossed into Ethiopia.” By Sunday evening, he could hear the conflict closing in. “We are hearing the sound of machine guns.... https://www.aljazeera.com/amp/news/2026/3/8/thousands-flee-akobo-after-south-sudan-army-issues-forced-evacuation-order

Addis Standard

@addisstandardeng · Post #21767 · 19.03.2026 г., 08:09

100,000 flee #South_Sudan offensive into #Ethiopia: #UNICEF An order by South Sudan's army to evacuate the opposition-held town of #Akobo earlier this month pushed an estimated 100,000 people to flee across the border into Ethiopia, UNICEF said Tuesday. Akobo in the eastern state of Jonglei is the latest flashpoint as fighting between the government and opposition has brought South Sudan back to the brink of all-out civil war. The army ordered an evacuation of the town, including foreign aid agencies, on March 6. It claims to have since taken control of Akobo, though there have been conflicting reports of events on the ground, which have been impossible to verify due to limited communications. A security source told AFP that the army had taken over the military barracks in Akobo & destroyed buildings in the vicinity to create a buffer zone, but no official report had yet been issued.... https://www.facebook.com/AddisstandardEng/posts/pfbid0UmiC7pyEye84FEktt3LwgfgMHiF2MFVjvnVcxkEguK724EysYDK2P7hXgDrMXpFpl

Addis Standard

@addisstandardeng · Post #21625 · 06.03.2026 г., 05:28

#South_Sudan: “People keep asking me, is help coming?” Last month, a grandmother, walked for seven days, carrying her month-and-a-few-days-old granddaughter, Nyabhan. Nyaphan Nyang, the grandmother, walked with a sense of urgency, surviving on leaves. She was fleeing from the conflict that had consumed #Walgak#Payam in #Akobo West, #Jonglei State. Besides, the baby was critically ill because of severe malnutrition. Hunger had become widespread as conflict resurged in Jonglei State in December 2025. Bhan’s father had been killed in the conflict, while her mother and siblings were kidnapped by armed youth. Nyaphan was the baby’s only hope. She did get her to safety and help. Unfortunately, it was too late. A few days later Nyabhan died. The baby and the grandmother were among the several displaced people who met with Under-Secretary-General for Humanitarian Affairs and Emergency Relief Coordinator (ERC), Tom Fletcher, about a ..... https://www.unocha.org/news/south-sudan-people-keep-asking-me-help-coming