def __init__(self, filename, content_type=None):
        """
        Initialise object, data is the data to send
    
        Parameters:

            * filename: Name of file to read and send
            * content_type: Value of Content-Type header, default is to guess from file extension
        """
        if content_type == None:
            content_type = mimetypes.guess_type(filename)[0]
        self.filename = filename
        self._headers = {'Transfer-Encoding': 'chunked',
                         'Content-Type': content_type}
def __init__ ( self , filename , content_type = None ) : if content_type == None : content_type = mimetypes . guess_type ( filename ) [ 0 ] self . filename = filename self . _headers = { 'Transfer-Encoding' : 'chunked' , 'Content-Type' : content_type }
Initialise object, data is the data to send
    
        Parameters:

            * filename: Name of file to read and send
            * content_type: Value of Content-Type header, default is to guess from file extension