'Open a dialogue box (dialog) using a program appropriate to the desktop
environment in use.
If the optional \'desktop\' parameter is specified then attempt to use
that particular desktop environment\'s mechanisms to open the dialog
instead of guessing or detecting which environment is being used.
Suggested values for \'desktop\' are "standard", "KDE", "GNOME",
"Mac OS X", "Windows".
The result of the dialogue interaction may be a string indicating user
input (for Input, Password, Menu, Pulldown), a list of strings
indicating selections of one or more items (for RadioList, CheckList),
or a value indicating true or false (for Question, Warning, Message,
Error).
Where a string value may be expected but no choice is made, an empty
string may be returned. Similarly, where a list of values is expected
but no choice is made, an empty list may be returned.'

def open(self, desktop=None):

    desktop_in_use = use_desktop(desktop)
    try:
        program = self.commands[desktop_in_use]
    except KeyError:
        raise OSError(("Desktop    '%s'    not    supported    (no    known    dialogue    box    command    could    be    suggested)" % desktop_in_use))
    (handler, options) = self.info[program]
    cmd = [program]
    for option in options:
        if isinstance(option, str):
            cmd.append(option)
        else:
            value = getattr(self, option.name, None)
            cmd += option.convert(value, program)
    return handler(cmd, 0)
