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

Резултати

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

Пребарај: #futureofrussia

当前筛选 #futureofrussia清除筛选
ART UNITES THE WORLD

@artunitesworld · Post #166 · 05.03.2026 г., 14:50

🖼 NFT + Physical Art - One of the Key Trends of 2026 The digital asset market is evolving rapidly. Just a few years ago, NFTs were primarily associated with digital images. Today, however, a new ownership model is emerging - a hybrid of physical art and blockchain technology. In 2026, this trend is accelerating: collectors, artists, and technology ecosystems are combining classical artworks with NFT passports secured on the blockchain. 🫥 What does this change? 🔹 Authenticity - a digital certificate verifies authorship and provenance. 🔹 Transparency - ownership history is recorded and cannot be altered. 🔹 Security - significantly reduces the risk of counterfeiting. 🔹 Liquidity - the asset can be integrated into the digital environment and participate in Web3 tools. 🔹 A new ownership model - a physical object receives a unique digital identifier. 🧬 In essence, we are witnessing the emergence of a new asset class: Art + Blockchain = a hybrid form of value. This is no longer an experiment or the NFT hype wave of 2021. It represents a more mature phase of market development - where technology enhances traditional art rather than replacing it. 🌍 Global practice shows that digital asset identification is becoming the standard. Art is one of the first sectors where this transformation is especially logical. To better understand how art meets blockchain, we invite you to explore DigitalExchange.art 🚀 Within the MirraCoin ecosystem, we are not only closely following this direction - we are actively building blockchain integrations, because the future of the digital economy is being shaped by exactly these hybrid solutions. 🚀 The future of assets is not “digital instead of physical.” 🚀 The future is synergy. • Physical value. • Digital protection. • Transparent history. • Web3 integration. 🇷🇺 In Russia, this global trend is only beginning to scale - together with the MirraCoin.io ecosystem 😎 #MirraCoin#MIRRC#NFT#DigitalExchangeArt#Blockchain#Web3#Art#Cryptocurrency#FutureOfRussia#CryptoNews#MadeInRussia @MirraChannel😎