@QuietWorld · Post #6726 · 17.10.2019 г., 13:01
It's often just enough to be with someone. I don't need to touch them. Not even talk. A feeling passes between you both. You're not alone. – Marilyn Monroe #solitude@quietworld🍃
Hashtags
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
Пребарај: #solitude
@QuietWorld · Post #6726 · 17.10.2019 г., 13:01
It's often just enough to be with someone. I don't need to touch them. Not even talk. A feeling passes between you both. You're not alone. – Marilyn Monroe #solitude@quietworld🍃
Hashtags
@QuietWorld · Post #6722 · 16.10.2019 г., 23:30
I have to be alone very often. I'd be quite happy if I spent from Saturday night until Monday morning alone in my apartment. That's how I refuel. – Audrey Hepburn #solitude@quietworld🍃
Hashtags
@QuietWorld · Post #6714 · 15.10.2019 г., 08:30
A man can be himself only so long as he is alone. – Arthur Schopenhauer #solitude @quietworld🍃
Hashtags
@QuietWorld · Post #6705 · 14.10.2019 г., 08:30
If you make friends with yourself you will never be alone. – Maxwell Maltz #solitude#quotes @quietworld🍃
@QuietWorld · Post #6701 · 13.10.2019 г., 23:30
Alone let him constantly meditate in solitude on that which is salutary for his soul, for he who meditates in solitude attains supreme bliss. – Guru Nanak #solitude#quotes @quietworld🍃
@QuietWorld · Post #6700 · 13.10.2019 г., 13:00
"There's a tremendous difference between alone and lonely. You could be lonely in a group of people. I like being alone. I like eating by myself. I go home at night and just watch a movie or hang out with my dog. I have to exert myself and really say, oh God, I've got to see my friends 'cause I'm too content being by myself." - Drew Barrymore - #quotes#solitude @quietworld🍃
@QuietWorld · Post #6673 · 09.10.2019 г., 12:00
We visit others as a matter of social obligation. How long has it been since we have visited ourselves? #solitude#quotes @quietworld🍃
@QuietWorld · Post #6670 · 09.10.2019 г., 00:00
Solitude is a good place to visit but a poor place to stay. —Josh Billings – #solitude#quotes @quietworld🍃
@QuietWorld · Post #6668 · 08.10.2019 г., 12:00
When we cannot bear to be alone, it means we do not properly value the only companion we will have from birth to death — ourselves. – Morris Adler – #solitude#quotes @quietworld🍃
@QuietWorld · Post #6662 · 08.10.2019 г., 05:00
There's one thing worse than being alone – wishing you were. #solitude#quotes @quietworld🍃
@QuietWorld · Post #6688 · 11.10.2019 г., 08:30
Men go abroad to wonder at the heights of mountains, at the huge waves of the sea, at the long courses of the rivers, at the vast compass of the ocean, at the circular motions of the stars; and they pass by themselves.., without wondering. – St. Augustine – #solitude#quotes#reflection @quietworld🍃
Hashtags
@QuietWorld · Post #6654 · 07.10.2019 г., 04:39
You have to start knowing yourself so well that you begin to know other people – a piece of us is in every person we can ever meet. —John D. MacDonald – #quotes#solitude#reflection @quietworld🍃
Hashtags