@maybeapoet · Post #20473 · 08.07.2024 г., 19:24
| speacial thanks to shakh (كاتب ) #freepalestine
Hashtags
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
Пребарај: #freepalestine
@maybeapoet · Post #20473 · 08.07.2024 г., 19:24
| speacial thanks to shakh (كاتب ) #freepalestine
Hashtags
@filosofarsogood · Post #11934 · 08.10.2024 г., 05:15
È appena uscito un nuovo episodio! #FreePalestine from HAMAS: 7 ottobre, un anno dopo Ascoltalo cliccando su https://open.spotify.com/episode/3OtA2ThNguUfFUIXU3tkrL
Hashtags
@mehmetperincek · Post #6687 · 17.09.2025 г., 11:14
🇮🇹🇵🇸 Roma sokaklarında adım başı Filistin'le dayanışma mesajları görmek mümkün. #FreePalestine
Hashtags
@marwa_osmanlb · Post #5045 · 31.10.2025 г., 18:31
Bravery is when your bones remember freedom, even after generations of chains. Resist for Palestine. #FreePalestine
Hashtags
@Yulduz_Usmonova · Post #3631 · 08.01.2025 г., 19:26
#FreePalestine Yulduz Usmonova va Mansur Agaliev tomonidan Falastindan olib kelingan ayollar va bolalarga "Shohsaroy" uylaridan 2 ta kvartira sovg'a qilindi. @Yulduz_Usmonova @YulduzIbragimovnaUsmonova
Hashtags
@Marwa_OsmanLB · Post #3497 · 19.10.2024 г., 17:21
The baton he cast never touched the ground; before it could fall, it was seized by those prepared to continue the path towards Liberation. Palestine remains resilient and unwavering, ever-ready to nurture countless successors like Sinwar, ensuring the struggle endures. #FreePalestine
Hashtags
@Marwa_OsmanLB · Post #3483 · 18.10.2024 г., 03:41
Martyr Yehya Sinwar faced his final moments with unwavering defiance. Clad in his fatigues, even with his right arm severed, he mustered the strength to hurl a stick at the Israeli drone recording him, a gesture of defiance in the face of overwhelming odds. From the moment he initiated the Al Aqsa Flood, he had accepted his fate with unyielding resolve. This footage serves as a potent symbol, one that will undoubtedly fuel the momentum of the rising tide. #FreePalestine
Hashtags
@unicornriotninja · Post #3435 · 07.08.2025 г., 14:17
Denver, CO: #FreePalestine Sit-In Protests Zionist Ties at Center on Colfax - 2/2 [Twitter Archive, August 6, 2024]: https://unicornriot.ninja/2024/pro-palestine-anti-genocide-activists-rally-outside-denver-community-center-with-ties-to-israel/
Hashtags
@unicornriotninja · Post #3434 · 07.08.2025 г., 14:17
Denver, CO: #FreePalestine Sit-In Protests Zionist Ties at Center on Colfax - 1/2 [Twitter Archive, August 6, 2024]: https://unicornriot.ninja/2024/pro-palestine-anti-genocide-activists-rally-outside-denver-community-center-with-ties-to-israel/
Hashtags
@Marwa_OsmanLB · Post #3310 · 22.09.2024 г., 06:43
Keep your chins up, Imam Ali pbuh once said: " In wars, Sometimes we strike our enemy, and sometimes our enemy strikes us." Not all days will be good, but we yearn for just a few good days and InshAllah, victory will be ours. #FreePalestine
Hashtags
@Marwa_OsmanLB · Post #3202 · 13.09.2024 г., 20:23
📍Location: Meron Mountain, northern occupied Palestine. 🔻Hezbollah Rockets rain on illegal colonial settlers after Israel killed civilians in south Lebanon hours before. Result: You reap what you sow. This is what haopens to you when you are land thieves. Leave. Now. #FreePalestine
Hashtags
@ertaisfr · Post #1721 · 27.10.2023 г., 10:14
Мусульмандардын каны төгүлгөн үчүн адам укугу деп дүйнөдө кыйкыргандар унчукпай отурушат. Эртең 28-ноябрь саат 11:00 Бишкекте Горький паркында Палестина элин колдоо акциясы өтөт. Исанова менен Рыскулова кесилишинде. Акция учурунда гумжардам чогултулат. #freepalestine
Hashtags