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