未知
donemail的Python项目详细描述
这是什么?
当某个进程/命令/功能/代码完成时,donemail会向您发送一封电子邮件。
安装
pip install donemail
用法
您需要在端口25上运行SMTP服务器。
在命令行中:
# run command 'sleep 10' and send an email after it exits donemail run bob@example.com sleep 10
或:
# send an email when process with pid 123 exits donemail wait bob@example.com 123
作为装饰师:
fromdonemailimportdonemail# send an email after each long_running_function() call@donemail('bob@example.com')deflong_running_function():sleep(10)
作为上下文管理器:
fromdonemailimportdonemail# send an email after sleep(10) completeswithdonemail('bob@example.com'):sleep(10)