@luckydonaldsbots · Post #248 · 02.07.2020 г., 19:55
Restoring the database backup of that bot for some reason brought down the whole database, so some other bots might be affected. #ongoing
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
Пребарај: #ongoing
@luckydonaldsbots · Post #248 · 02.07.2020 г., 19:55
Restoring the database backup of that bot for some reason brought down the whole database, so some other bots might be affected. #ongoing
Hashtags
@luckydonaldsbots · Post #211 · 23.08.2019 г., 12:08
Currently the server is quite slow, as I’m upgrading a huge database. #ongoing
Hashtags
@luckydonaldsbots · Post #247 · 02.07.2020 г., 18:59
Took down @RulesRulesBot to move it to the new server as well. Somehow I did miss that one. #ongoing#RulesRulesBot
Hashtags
@meddahstories · Post #1917 · 04.03.2024 г., 09:44
До окончания перевода дорамы "Смертельная игра" осталось всего пять серий. Самое время насладиться остом, который исполнил сам Ся Чжигуан (Жуань Ланьчжу / Наньчжу), дабы утешиться... #China#drama#TheSpirealm#ongoing#XiaZhiGuang
@luckydonaldsbots · Post #210 · 08.08.2019 г., 10:33
Due to the new animated stickers having a different format, @StickerTagBot’s tagging functionality is currently out of service. The inline search as well as the getstickers.me website continues to be working. #ongoing#StickerTagBot#getstickersme I’ll have time to look into that in a week.
@luckydonaldsbots · Post #230 · 23.03.2020 г., 11:24
I will definitely work hard to keep the most important group management services stable, including: @JoinCaptchaBot, @RulesRulesBot, @BanWarnBot, and @HeyAdminBot. And for now also the less important @NoServiceBot. #PermalinkBot#NoServiceBot#RulesRulesBot, #BanWarnBot#HeyAdminBot #ongoing#issue