TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

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

Hashtags

Резултати

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

Пребарај: #altcoins

当前筛选 #altcoins清除筛选
Coin Signals

@coin_signals · Post #16875 · 11.08.2025 г., 19:28

📊 There is no strength in the market; very few coins have posted double-digit returns in the past 7 days. First, LTC pumped, then ETH, and then BTC. The overall market is not trending upward together. (possibility of exit pumps) $BTC Bullish if holds above $121k. $ETH Bullish Right Now #Altcoins still Bearish.

Hashtags

Michaël Van de Poppe Official

@michaelvandepoppeanalyst · Post #4828 · 13.09.2024 г., 10:18

The markets are heating up for a strong October and November. That's why you want to be positioned into strong #Altcoins. $OM is one of them, only 24% down from the ATH, it's looking primed for a strong continuation in upcoming months.

Hashtags

Michaël Van de Poppe Official

@michaelvandepoppeanalyst · Post #4824 · 12.09.2024 г., 10:26

#Altcoins are doing relatively well. $SEI continues to find momentum, and I'd like to see it rally to $0.34 (preferably even above the previous high, but not expecting that yet), make an HL, and continue that rally to $0.44 in October.

Hashtags

Michaël Van de Poppe Official

@michaelvandepoppeanalyst · Post #4795 · 09.09.2024 г., 13:30

#Altcoins are doing great, silently. $OP has been gaining momentum, up 28% since the recent low. Rounded bottom with a 3-day bullish divergence. Needs to break through 2750-2850 sats, and then the divergence becomes valid. Expecting a big breakout.

Hashtags

Michaël Van de Poppe Official

@michaelvandepoppeanalyst · Post #4789 · 08.09.2024 г., 10:40

The #Altcoins show a potential bullish divergence on the Others/BTC chart. Very important, as that might be an indicator of what's going to come. The bottoming process is fully in place.

Hashtags

Michaël Van de Poppe Official

@michaelvandepoppeanalyst · Post #4787 · 07.09.2024 г., 16:08

Ethereum #altcoins aren't doing bad, as $OP is currently up from the lows. However, on the larger scale, it's currently down substantially and it's back to the lows. I'm expecting a lot more upside to come on this one once EigenLayer comes into action.

Hashtags

Michaël Van de Poppe Official

@michaelvandepoppeanalyst · Post #4776 · 06.09.2024 г., 16:52

#Altcoins aren't doing that wrong, as $SEI is currently looking at a crucial support test. I'd like to see $SEI stay above $0.24. If that's the case, we'll be good to go towards $0.45.

Hashtags

123•••10•••20•••2526
ПретходнаСтраница 1 од 26Следна