@WorldNews · Post #74031 · 11.04.2026 г., 09:34
Iran's new supreme leader has severe and disfiguring wounds, sources say [Read FullArticle] @WorldNews#IranNews#WorldUpdate#SupremeLeader
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #191 · 14 дек.
Как разделить строку с shell-командой на отдельные аргументы в виде списка? Если сделать просто сплит по пробелу то получим то что надо, кроме случаев со вставками текста с пробелами. Например так: >>> '-arg "I Am Groot"'.split(' ') ['-arg', '"I', 'Am', 'Groot"'] Чтобы учитывать текст в кавычках как единый аргумент можно воспользоваться функцией shlex.split() Кто читает мой канал давно, уже в курсе. А что делать, если нужно обратное действие? Объединить аргументы из списка в строку и при этом добавить кавычки в аргумент с пробелами. Конечно, если вы используете subprocess то он сам всё разрулит. Но если вам нужна именно команда одной строкой, то можно воспользоваться готовой функцией в том же subprocess. >>> from subprocess import list2cmdline >>> list2cmdline(['-arg', 'I Am Groot']) '-arg "I Am Groot"' Он также позаботится об экранировании уже имеющихся кавычек >>> list2cmdline(['-arg', 'I Am "Groot"']) '-arg "I Am \"Groot\""' А вот так он может "схлопнуть" в команду JSON >>> list2cmdline(['--json', json.dumps({'key': 'value'})]) '--json "{\"key\": \"value\"}"' _______________ Возможно кто-то спросит, а зачем соединять аргументы в строку если subprocess сам это сделает а os.system не наш путь? Мне как-то потребовалось отправлять команду на удалённое выполнение и в API поддерживалось указание команды только строкой. Так что всякое бывает) #libs#basic
Пребарај: #supremeleader
@WorldNews · Post #74031 · 11.04.2026 г., 09:34
Iran's new supreme leader has severe and disfiguring wounds, sources say [Read FullArticle] @WorldNews#IranNews#WorldUpdate#SupremeLeader
@CryptoM · Post #65253 · 12.04.2026 г., 10:35
🚀 Iran's Foreign Policy Focuses on National Protection, Adviser States Iran's Supreme Leader's foreign affairs adviser, Velayati, stated on his social media platform on the 12th that Iran's foreign policy consistently adheres to the principle of 'protecting our homeland.' According to Odaily, he emphasized that control over the Strait of Hormuz is firmly in Iran's hands. #Iran#ForeignPolicy#NationalProtection#StraitOfHormuz#Velayati#SupremeLeader#HomelandProtection
@googlefactss · Post #40796 · 14.03.2026 г., 20:05
Mojtaba Khamenei became Supreme Leader of Iran after his father, Ali Khamenei, was killed in a U.S.–Israeli airstrike. He leads with hard-line policies, controlling the military, security forces, and political decisions. For ordinary Iranians, this means strict government control, limited political freedom, limited internet, harsh enforcement of laws, and continued tensions with the West. Daily life and dissent will likely remain tightly restricted under his rule. 🕌🇮🇷⚔️ [Read more] @googlefactss #Iran#MojtabaKhamenei#SupremeLeader#politics#newsfacts#freeIran#protests#womensrights
@googlefactss · Post #40731 · 03.03.2026 г., 17:02
Ali Hosseini Khamenei was born on 19 April 1939 in Mashhad, Iran. He was a Shiite cleric and political leader. He took part in the 1979 Iranian Revolution. He later became President of Iran from 1981 to 1989 during the Iran–Iraq War. On 4 June 1989, after the death of Ruhollah Khomeini, he was chosen as the 2nd Supreme Leader of Iran. He held this role until 28 February 2026. As Supreme Leader, he had authority over the military, judiciary, state media, intelligence services, and foreign policy. He oversaw Iran’s nuclear program and strengthened the Islamic Revolutionary Guard Corps. His government carried out crackdowns on protests and dissent. He was reported killed on 28 February 2026 during Israeli missile attacks in Tehran. His death was confirmed on 1 March 2026. His son is replacing him. 🏛️🇮🇷📜 [Read more] @googlefactss #AliKhamenei#Iran#SupremeLeader#dictator#IranHistory#MiddleEast#freeIran#LiberateWomen#protest