gui/dialog.py
def select_font(message="", title="", font=None, parent=None):
    "Show a dialog to select a font"
    if font is not None:
        wx_font = font._get_wx_font()                   # use as default
    else:
        wx_font = None
        font = Font()                                   # create an empty font
    result = dialogs.fontDialog(parent, font=wx_font)
    if result.accepted:
        font_data = result.fontData
        result.color = result.fontData.GetColour().Get()
        wx_font = result.fontData.GetChosenFont()
        font.set_wx_font(wx_font)
        wx_font = None
        return font
def select_font(message="", title="", font=None, parent=None):
    "Show a dialog to select a font"
    if font is not None:
        wx_font = font._get_wx_font()                   # use as default
    else:
        wx_font = None
        font = Font()                                   # create an empty font
    result = dialogs.fontDialog(parent, font=wx_font)
    if result.accepted:
        font_data = result.fontData
        result.color = result.fontData.GetColour().Get()
        wx_font = result.fontData.GetChosenFont()
        font.set_wx_font(wx_font)
        wx_font = None
        return font
Show a dialog to select a font