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

Резултати

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

Пребарај: #lrc

当前筛选 #lrc清除筛选
Pro Analysis

@proanalysistrader · Post #28420 · 26.01.2025 г., 10:58

#LRC/USDT analysis : #LRC has retraced to the previous resistance zone, which is now acting as support for the price. From this level, bullish momentum is expected, with the previous swing high serving as the target level for upward movement. TF : 1D Entry : $0.1700 Target : $0.3338 SL : $0.1300

Hashtags

Pro Analysis

@proanalysistrader · Post #27721 · 02.07.2024 г., 05:30

#LRC/USDT analysis - #LRC is currently experiencing a downtrend and is trading below the 200-day Exponential Moving Average (EMA). The price is undergoing a pullback and is anticipated to test the resistance zone close to the 200 EMA shortly before potentially declining further to retest the previous lows. TF : 4h Entry : $0.1890 Target : $0.1601 SL : $0.1994

Hashtags

American Crypto©

@americancryptotrading · Post #27612 · 07.05.2026 г., 08:28

🇺🇸#LRC/USDT is consolidating near the lowerborder of the descendingchannel on the weekly timeframe🧐 A pump is expected if we bounce📈 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27584 · 10.04.2026 г., 09:22

🇺🇸#LRC/USDT has found support at the lowerborder of the descendingchannel formation on the weekly timeframe🔍 Further upside possible after bounce🐃 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27156 · 16.02.2025 г., 17:21

🇺🇸#LRC/USDT is bouncing from the lowerborder of the fallingwedge on the weekly timeframe🔍 Send it📈 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27110 · 05.01.2025 г., 17:51

🇺🇸#LRC/USDT has formed the descendingresistance line on the weekly chart👨‍💻 Looks good for the mid-term📈 American Crypto©

Hashtags

Binance crypto champions

@binancecryptochampions · Post #2942 · 11.12.2025 г., 07:06

✴️Free signal-Futures ✴️ ⚡️⚡️#LRC/USDT⚡️⚡️ Signal Type: Regular (Long) Leverage: Cross (20x) Margin: 2.0% Entry Targets: 1) 0.05500 2) 0.05900 Take-Profit Targets: 1) 0.06200 2) 0.06300 3) 0.06500 Stop Targets: 1) 0.05300 🍁 Published by: @Trading_exp🍁 Join_vip: @Crypto_Futures_Spot_Payment_bot

Hashtags

Crypto

@signal_bitcoins · Post #2813 · 15.02.2024 г., 08:55

#LRC has a symmetrical triangle pattern on Daily time frame,in the case of breakup we will see another huge pump again 🚀 ❄️@signals_bitcoin_crypto❄️ ❄️@Shadow_support0o❄️

Hashtags

Crypto

@signal_bitcoins · Post #2136 · 02.01.2024 г., 10:34

#LRC bounced back from the Demand zone also touched the curve on Weekly time frame,we need a bullish momentum to breakup this pattern 🚀 ❄️@signals_bitcoin_crypto❄️ ❄️@Shadow_support0o❄️

Hashtags

12
ПретходнаСтраница 1 од 2Следна