(self, dest_filename, mode="w")
return True
Copy self.filename to another file. We avoid shutil to have
        the fewest possible dependencies on other Python modules.
Copy self.filename to another file. We avoid shutil to have
        the fewest possible dependencies on other Python modules.
Copy self . filename to another file . We avoid shutil to have the fewest possible dependencies on other Python modules .
def _file2file(self, dest_filename, mode="w"):
        """Copy self.filename to another file. We avoid shutil to have
        the fewest possible dependencies on other Python modules.
        """
        try:
            fpsrc = open(self.filename, "rb")
        except (IOError, OSError):
            return False
        try:
            fpdst = open(dest_filename, mode + "b")
        except (IOError, OSError):
            fpsrc.close()
            return False
        while True:
            copy_buffer = fpsrc.read(1024 * 1024)
            if not copy_buffer:
                break
            fpdst.write(copy_buffer)
        fpsrc.close()
        fpdst.close()
        return True
def _file2file ( self , dest_filename , mode = "w" ) : try : fpsrc = open ( self . filename , "rb" ) except ( IOError , OSError ) : return False try : fpdst = open ( dest_filename , mode + "b" ) except ( IOError , OSError ) : fpsrc . close ( ) return False while True : copy_buffer = fpsrc . read ( 1024 * 1024 ) if not copy_buffer : break fpdst . write ( copy_buffer ) fpsrc . close ( ) fpdst . close ( ) return True