def __del__ ( self ) : if self . _delete_file : try : os . remove ( self . name ) except ( OSError , IOError ) : pass
how to delete self file in python
Deletes the database file .
def __del__(self):
    """Deletes the database file."""
    if self._delete_file:
      try:
        os.remove(self.name)
      except (OSError, IOError):
        pass