def GenerateCommand(self):
    """Generate the actual commands to execute.

    Some special casing is needed here per-class type because of the original
    design of CocoaDialog itself being inconsistent unfortunately.

    SubClasses will normally call super and extend the array with their own
    parameters.

    Returns:
      an array of commands.
    """
    cmds = [self._cocoadialog]
    # Cocoa Dialog uses "-" in run modes, Python classes can't use this char.
    runmode = self.__class__.__name__.lower().replace('_', '-')
    cmds.append(runmode)
    cmds.append('--string-output')
    if self.title:
      cmds.extend(['--title', self._title])
    if self.debug:
      cmds.append('--debug')
    if not self._timeout:
      if runmode is not 'bubble':
        cmds.append('--no-timeout')  # only bubble supports this option.
    else:
      cmds.extend(['--timeout', self._timeout])
    if self._width:
      cmds.extend(['--width', self._width])
    if self._height:
      cmds.extend(['--height', self._height])
    return cmds
dataset/ETHPy150Open google/macops/gmacpyutil/gmacpyutil/cocoadialog.py/Dialog.GenerateCommand/operator `==` -> `is not`