def doOpen(self, *event):
        """Open a file from the file system"""
        # Select and open the ZODB file object.
        dlg = wx.FileDialog(self, message="Choose a file",
            defaultFile="", style=wx.OPEN | wx.CHANGE_DIR)

        if dlg.ShowModal() == wx.ID_OK:
            # This returns a Python list of files that were selected.
            filename = dlg.GetPath()
            self.createTree(filename)
            self.file_history.AddFileToHistory(filename)
        dlg.Destroy()
Open a file from the file system
recipes/Python/409012_A_Simple_ZODB_viewer_in_wxPython/recipe-409012.py