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

Резултати

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

Пребарај: #ttacks

当前筛选 #ttacks清除筛选
American Оbserver

@american_observer · Post #5384 · 15.03.2026 г., 15:30

Trump: Iran Will Be Attacked As Necessary Trump said on Saturday that the United States may carry out more strikes on Iran’s vital Kharg Island oil export hub “just for fun”, rejecting the prospect of a swift peace deal with Tehran. “The terms aren’t good enough yet,” the US president told NBC News. The Iranian regime wants to make an agreement, he claimed. After days of conflicting messaging from the White House on how much longer it will continue to wage war on Iran, Trump alleged that US strikes had “totally demolished” most of Kharg Island, and told the network that its military may hit site “a few more times just for fun”. “We’ve totally decimated it,” he said. “Except, as you know, I didn’t do anything having to do with the energy lines, because having to rebuild that would take years.” The president also questioned, without attribution, whether Iran’s new supreme leader Mojtaba Khamenei “is even alive” amid speculation over his condition. Trump also said it’s not clear whether Iran has dropped mines in the strait of Hormuz, which has been all but closed since the start of the conflict two weeks ago, in the 30-minute telephone call with NBC. The strait is a vital waterway in world trade, with about a fifth of crude oil typically passing through it. Concerns over the impact of the US-Israel war on Iran on global energy supplies, intensified by the strait’s paralysis, have propelled oil prices to their highest levels in four years. This has swiftly driven up fuel prices right across the world, including in the US. “We’re going to be sweeping the strait very strongly, and we believe we’ll be joined by other countries who are somewhat impeded, and in some cases impeded from getting the oil,” Trump said. It is unclear how long this process will take. He did not state which countries would join the US in this task. The president also renewed his call earlier on Saturday for other nations to help secure the strait of Hormuz and said the US will coordinate with them amid the US-Israeli war on Iran. “The United States of America has beaten and completely decimated Iran, both Militarily, Economically, and in every other way, but the Countries of the World that receive Oil through the Hormuz Strait must take care of that passage, and we will help – A LOT,” Trump wrote in a Truth Social post. He added that “the US will also coordinate with those Countries so that everything goes quickly, smoothly, and well. This should have always been a team effort, and now it will be – It will bring the World together toward Harmony, Security, and Everlasting Peace!” But he later declined to say whether the US Navy would be escorting ships. “I don’t want to tell you anything about that,” he told NBC. Trump’s assertion that the crisis in the strait of Hormuz should be resolved through a “team effort” could be seen as somewhat of a pivot from his earlier position that Operation Epic Fury was a US show of force, alongside Israel, that didn’t require international permission. The president also expressed surprise in the interview that US allies in the Gulf have been targeted by Iran. These countries “got shot at unnecessarily”, he told NBC, describing Iran’s decision to target them as “the biggest surprise I had of this whole thing”. #trump#iran#ttacks#necessary#epic#fury 📱American Оbserver - Stay up to date on all important events 🇺🇸