#NEWLINE# def attach_file( self , path , mimetype = None ) : #NEWLINE# #INDENT# 'Attaches a file from the filesystem.' #NEWLINE# filename = os . path . basename ( path ) #NEWLINE# with open ( path , 'rb' ) as f : #NEWLINE# #INDENT# content = f . read ( ) #NEWLINE# #UNINDENT# self . attach ( filename , mimetype , mimetype )