<p>I would like to compress a folder and all its sub-folders/files, and email the zip file as an attachment. What would be the best way to achieve this with Python? </p>

Look at
zipfile
for compressing a folder and it's subfolders.
Look at
smtplib
for an email client.