1. yagmail
import yagmail
yag = yagmail.SMTP(user='[email protected]', password='nicai?', host='smtp.163.com', port='25')
yag.send(user, subject = "I now can send an attachment", attachments=['a.txt', 'b.jpg'])
2. requests比urllib方便许多
3. psutil4. psutil无法满足所有需求,下面三个是常用的系统级库sh可以用 Python 函数的语法去调用 shell 命令,sh 之于 subprocess 类似 requests 之于 urllib2。
Watchdog
5. BeautifulSoup