

def GenerateCommand(self):
    'Generate the actual commands to execute.\n\n    Some special casing is needed here per-class type because of the original\n    design of CocoaDialog itself being inconsistent unfortunately.\n\n    SubClasses will normally call super and extend the array with their own\n    parameters.\n\n    Returns:\n      an array of commands.\n    '
    cmds = [self._cocoadialog]
    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 == 'bubble'):
            cmds.append('--no-timeout')
    else:
        cmds.extend(['--timeout', cmds._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/VarMisuse@128/280 `self`->`cmds`