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

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #183 · 23 ное.

Python + bash Если вам часто требуется запускать shell команды из Python-кода, какой способ вы используете? Самый низкоуровневый это функция os.system(), либо os.popen(). Рекомендованный способ это subprocess.call(). Но это всё еще достаточно неудобно. Советую обратить своё внимание на очень крутую библиотеку sh. Что она умеет? 🔸 удобный синтаксис вызова команд как функций # os import os os.system("tar cvf demo.tar ~/") # subprocess import subprocess subprocess.call(['tar', 'cvf', 'demo.tar', '~/']) # sh import sh sh.tar('cvf', 'demo.tar', "~/") 🔸 простое создание функции-алиаса для длинной команды fn = sh.lsof.bake('-i', '-P', '-n') output = sh.grep(fn(), 'LISTEN') в этом примере также задействован пайпинг 🔸 удобный вызов команд от sudo with sh.contrib.sudo: print(ls("/root")) Такой запрос спросит пароль. Чтобы это работало нужно соответствующим способом настроить юзера. А вот вариант с вводом пароля через код. password = "secret" sudo = sh.sudo.bake("-S", _in=password+"\n") print(sudo.ls("/root")) Это не все фишки. Больше интересных примеров смотрите в документации. Специально для Windows💀 юзеров #libs#linux

Hashtags

Резултати

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

Пребарај: #telegramthursday

当前筛选 #telegramthursday清除筛选

It's 'Telegram Thursday' and I want to recommend interesting channels. Today I was recommended a pretty fine channel, which focuses on Paganism: https://t.me/s/pagan_revivalism @Pagan_Revivalism Check it out and share if you like the content! The second channel I enjoy to check out every now and then is this one: https://t.me/s/folkwisdom @folkwisdom Pretty interesting forwards sometimes, from accelerationism to white pills. #TelegramThursday @EuropeanTribalism

It's 'Telegram Thursday' and I want to recommend interesting channels. Today I want to point out a channel dedicated to Germanic topics with lots of own content: https://t.me/s/oakwhispers @oakwhispers Give the creator a chance and check it out! It's important that we have channels like this, which add own content instead of plain forwarding. #TelegramThursday @EuropeanTribalism

It is 'Telegram Thursday' and I want to recommend you interesting channels. Today I would like to recommend a couple of channels I regularly read. No, not just content skipping, but actually reflecting on the content: https://t.me/tribeofthefox https://t.me/GreekLeague https://t.me/folkwisdom https://t.me/skogarvordurinn Go ahead and check them out! #TelegramThursday @EuropeanTribalism

It is 'Telegram Thursday' and I want to recommend you interesting channels. Today I would like to point out the channel from a lad I know from the time I was still on Twitter: https://t.me/AureusPress There is art, neo-futurism and quite some gems to be found on this channel. So go and check it! #TelegramThursday @EuropeanTribalism

I am not sure if everybody is aware that you can access all Telegram channels without having Telegram installed. You want to visit your favourite channel @EuropeanTribalism over your web browser? Try this: https://t.me/s/EuropeanTribalism You want to share the fantastic articles from @solarcult? Try this: https://t.me/s/solarcult Want to read one of @morrigancarrick's memes? Just add a number, which is the article ID at the end. Try this: https://t.me/s/morrigancarrick/533 Share it with your Telegram-free friends! #TelegramThursday @EuropeanTribalism

It's 'Telegram Thursday' and I want to recommend you some interesting channels: @PrimordialPath - a very interesting channel with straightforward opinions and views. If you are into Folk Futurism, go and check it out! @Solarcult - a channel devoted to mythology, history and Aryan heritage. Definetly worth a follow. @VolkischShakti - this channel focuses on information about female deities. If you are into mythology, it's worth to read it. Be sure to share quality content when you find it! #TelegramThursday @EuropeanTribalism

It is 'Telegram Thursday' and I want to recommend you some interesting channels: @philosophicat, who also runs a youtube channel by this name, adds a very unique perspective to current happenings. Also check out her series on Evolas 'Revolt Against the Modern World'! @aryologia has lots of interesting content if you are interested in Indo-Aryan culture. @mythologicalfact focuses on Vedic content. If you want to extend your knowledge about ancient myths, be sure to give them a follow. @getthispdf is my channel for collecting interesting eBooks for the topics physics, spirituality and history. If you want a good read, check it out. Be sure to share quality content when you encounter it! #TelegramThursday @EuropeanTribalism

It's 'Telegram Thursday' and I want to recommend you interesting channels. Today marks the first of a series of recommendations, based on the various expressions of European culture. We start with a channel, which focuses on the Slavic aspect: https://t.me/THEOLDWAYS Have a look and follow! #Slavic#TelegramThursday @EuropeanTribalism

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