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。
Watchdog5. BeautifulSoup