(self)
Closes the wrapped file.
Closes the wrapped file.
Closes the wrapped file .
def close(self):
        """Closes the wrapped file.
        """

        if self.is_closed:
            raise Exception("This file is already closed")
        if self.onclose:
            self.onclose(self)
        if hasattr(self.file, "close"):
            self.file.close()
        self.is_closed = True
def close ( self ) : if self . is_closed : raise Exception ( "This file is already closed" ) if self . onclose : self . onclose ( self ) if hasattr ( self . file , "close" ) : self . file . close ( ) self . is_closed = True