code: def Open(self, filename, read_only=False):
      
      if self._connection:
        raise RuntimeError('Cannot open database already opened.')
  
      self.filename = filename
      self.read_only = read_only
  
      try:
        self._connection = sqlite3.connect(filename)
      except sqlite3.OperationalError:
        return False
  
      if not self._connection:
        return False
  
      self._cursor = self._connection.cursor()
      if not self._cursor:
        return False
  
      return True
docs: Opens the database file.
  
      Args:
        filename (str): filename of the database.
        read_only (Optional[bool]): True if the database should be opened in
            read-only mode. Since sqlite3 does not support a real read-only
            mode we fake it by only permitting SELECT queries.
  
      Returns:
        bool: True if successful.
  
      Raises:
        RuntimeError: if the database is already opened.