gui/dialog.py
def prompt(message="", title="", default="", multiline=False, password=None, 
           parent=None):
    "Modal dialog asking for an input, returns string or None if cancelled"
    if password:
        style = wx.TE_PASSWORD | wx.OK | wx.CANCEL
        result = dialogs.textEntryDialog(parent, message, title, default, style)
    elif multiline:
        style = wx.TE_MULTILINE | wx.OK | wx.CANCEL
        result = dialogs.textEntryDialog(parent, message, title, default, style)
        # workaround for Mac OS X
        result.text = '\n'.join(result.text.splitlines())
    else:
        result = dialogs.textEntryDialog(parent, message, title, default)
    if result.accepted:
        return result.text
def prompt(message="", title="", default="", multiline=False, password=None, 
           parent=None):
    "Modal dialog asking for an input, returns string or None if cancelled"
    if password:
        style = wx.TE_PASSWORD | wx.OK | wx.CANCEL
        result = dialogs.textEntryDialog(parent, message, title, default, style)
    elif multiline:
        style = wx.TE_MULTILINE | wx.OK | wx.CANCEL
        result = dialogs.textEntryDialog(parent, message, title, default, style)
        # workaround for Mac OS X
        result.text = '\n'.join(result.text.splitlines())
    else:
        result = dialogs.textEntryDialog(parent, message, title, default)
    if result.accepted:
        return result.text
Modal dialog asking for an input, returns string or None if cancelled