@jdmaxchannel · Post #5257 · 31.01.2026 г., 17:51
⚡️Биткоин резко упал до $79 000. Это самое сильное падение с весны 2025 года. JDMax #need
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
Пребарај: #need
@jdmaxchannel · Post #5257 · 31.01.2026 г., 17:51
⚡️Биткоин резко упал до $79 000. Это самое сильное падение с весны 2025 года. JDMax #need
Hashtags
@testflightynoti · Post #37765 · 07.05.2026 г., 08:26
#Need#Texting Join the Need Texting beta on ✈️#TestFlight 🔗 Link: https://testflight.apple.com/join/YSGVWMm9 Shared by Dimitri
Hashtags
@american_observer · Post #5204 · 23.02.2026 г., 14:09
Ukraine Needs 250,000 More Soldiers To Claw Back Control Over the Battlefield Ukraine needs 250,000 more troops to turn the tide of the fighting. This is the opinion of NATO military experts. The former Prime Minister of the United Kingdom, Boris Johnson, said in an interview with the BBC that the country should immediately send troops to Ukraine and not wait for a ceasefire to do so. He talks about about 7,000 soldiers to provide security guarantees. “If we have a plan to deploy troops on the territory of Ukraine after the war, after Putin deigned to agree to a ceasefire, why not do it now?”, he says. However, NATO experts believe that the victory of Ukraine or at least a significant turnaround in the confrontation at the front will require at least 250,000 additional troops and much more powerful weapons. Western intelligence services believe that Ukraine is now outnumbered by Russian forces on most fronts. And the Kremlin, despite its huge losses, would be able to continue the war for at least another year at the current attrition rate. According to the head of the Armed Forces, 2025 was the first year when the losses of the Russian Federation exceeded the replenishment of the occupiers. In January, Defense Minister Fedorov said that 2 million Ukrainians were wanted. #ukraine#need#soldiers#experts#military 📱American Оbserver - Stay up to date on all important events 🇺🇸
@TFGames · Post #1514 · 13.12.2023 г., 14:01
#NEED#FOR#SPEED#MOBILE#GAMES https://testflight.apple.com/join/b3vLiAtW
@TFGames · Post #1477 · 11.12.2023 г., 20:05
#NEED#FOR#SPEED#MOBILE#GAMES https://testflight.apple.com/join/b3vLiAtW
@TFGames · Post #1447 · 10.12.2023 г., 14:45
#NEED#FOR#SPEED#MOBILE#GAMES https://testflight.apple.com/join/b3vLiAtW
@TFGames · Post #1413 · 08.12.2023 г., 20:31
#NEED#FOR#SPEED#MOBILE#GAMES https://testflight.apple.com/join/b3vLiAtW
@TFGames · Post #1397 · 07.12.2023 г., 22:26
#NEED#FOR#SPEED#MOBILE#GAMES https://testflight.apple.com/join/b3vLiAtW
@TFGames · Post #1362 · 07.12.2023 г., 06:16
#NEED#FOR#SPEED#MOBILE#GAMES https://testflight.apple.com/join/b3vLiAtW
@TFGames · Post #1361 · 07.12.2023 г., 05:40
#NEED#FOR#SPEED#极品飞车在线移动版#GAMES https://testflight.apple.com/join/d3e9PLKt
Hashtags