def open_file_dialog(windowTitle, wildcard, defaultDir=os.getcwd(), style=None, parent=None):
    """ Opens a wx widget file select dialog.
        Wild card specifies which kinds of files are allowed.
        Style - specifies style of dialog (read wx documentation for information)
    """

    if parent == None:
        app = wx.App(None)

    if style == None:
        style = wx.OPEN | wx.CHANGE_DIR

    dialog = wx.FileDialog(parent, windowTitle, defaultDir=defaultDir, wildcard=wildcard,
                           style=style)

    if dialog.ShowModal() == wx.ID_OK:
        path = dialog.GetPath()
    else:
        path = None
    dialog.Destroy()
    return path
def open_file_dialog ( windowTitle , wildcard , defaultDir = os . getcwd ( ) , style = None , parent = None ) : if parent == None : app = wx . App ( None ) if style == None : style = wx . OPEN | wx . CHANGE_DIR dialog = wx . FileDialog ( parent , windowTitle , defaultDir = defaultDir , wildcard = wildcard , style = style ) if dialog . ShowModal ( ) == wx . ID_OK : path = dialog . GetPath ( ) else : path = None dialog . Destroy ( ) return path
Opens a wx widget file select dialog.
        Wild card specifies which kinds of files are allowed.
        Style - specifies style of dialog (read wx documentation for information)