@Aetatesolis · Post #4039 · 21.03.2025 г., 13:37
The Lord of the Rings 🎨 Darrell K. Sweet (🇺🇸, 1934-2011) #tolkien #lotr AETATESOLIS
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
Пребарај: #tolkien
@Aetatesolis · Post #4039 · 21.03.2025 г., 13:37
The Lord of the Rings 🎨 Darrell K. Sweet (🇺🇸, 1934-2011) #tolkien #lotr AETATESOLIS
@Aetatesolis · Post #4033 · 21.03.2025 г., 12:36
The Lord of the Rings 🎨 Darrell K. Sweet (🇺🇸, 1934-2011) Sweet was best known for providing cover art for science fiction and fantasy novels, in which capacity he was nominated for a Hugo Award in 1983. #tolkien #lotr AETATESOLIS
@Aetatesolis · Post #3779 · 13.01.2025 г., 12:46
The Lord of the Rings 🎨 Tim Kirk (🇺🇸, 1947 - ...) Art for the 1975 Tolkien Calendar. #lotr#tolkien AETATESOLIS
@filosofarsogood · Post #11933 · 07.10.2024 г., 10:02
Enrico Gamba, in arte 151eg, cogita sulla Favola moderna, tra #DISNEY, #MIYAZAKI e #TOLKIEN: simbolismo, significato ed educazione, in una Cogitata stupenda! https://youtu.be/RmrW2ueDqCI
@sarconsulurals · Post #2976 · 03.01.2026 г., 04:16
🗓January 3 marks the birth of J.R.R. Tolkien (1892-1973), the legendary author of The Lord of the Rings and The Hobbit. 📍 He was born in Bloemfontein, now the capital of South Africa’s Free State province and the country’s judicial capital 🇿🇦📚 👨💼 Tolkien’s father, Arthur Tolkien, worked as a banker and was transferred from the United Kingdom to Bloemfontein for career advancement. The family’s African servants considered baby John exceptionally handsome and admired him greatly. 👶 On one occasion, a servant named Isaak took the infant Tolkien to his kraal for the night to introduce him to his family. Years later, he named his first son Isaak Mister Tolkien Victor in the child’s honor. ✈️ When Tolkien was three, he traveled to England with his mother Mabel and younger brother Hilary. During their stay, Arthur Tolkien died in Bloemfontein from acute rheumatic fever. The family never returned to South Africa after his death. 🧠 Tolkien later said he remembered very little of his early years in South Africa. Biographers note that he retained a few words of Afrikaans, though he was not fluent. 🏨 Today, Bloemfontein proudly highlights its link to Tolkien. The four-star Hobbit Boutique Hotel promotes itself as his birthplace, features a commemorative plaque, and names all its rooms after characters from The Lord of the Rings and The Hobbit. #Literature#Books#History#Tolkien#SouthAfrica#Africa
@Aetatesolis · Post #3798 · 21.01.2025 г., 17:32
Der Berggeist 🎨 Josef Madlener (🇩🇪, 1881-1967) Der Berggeist is "The Mountain Spirit". According to Carpenter, Tolkien bought the postcard during his trip to Europe. The envelope containing it was later found with the inscription: "Origin of Gandalf". However, the picture was painted about 1925-1930 and if I remember correctly the postcard was published 1935 in a folder with three or four other pictures. So the postcard must come by another way into Tolkien's hands. #tolkien#gandalf #lotr Source AETATESOLIS
@dreamsgallerys · Post #2282 · 23.04.2024 г., 09:36
by Rene Gross #арт#art#some#gross#lotr#baraddur#fantasy#tolkien#landscape Dreams Gallery
@dreamsgallerys · Post #2227 · 20.03.2024 г., 14:30
Ещё один любимый персонаж By Voodoont #voodoont #ai#арт#art#girl#elf#city#arwen#liv_tyler#tolkien#Middle_earth#old_work#lotr Dreams Gallery