X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e4a197e4c60e461b8068b0619692ea083e30b8b..bfdc04a9bb95e6865570d59192718052b6229221:/wxPython/demo/wxFileDialog.py diff --git a/wxPython/demo/wxFileDialog.py b/wxPython/demo/wxFileDialog.py index a73dc06970..a87dc17194 100644 --- a/wxPython/demo/wxFileDialog.py +++ b/wxPython/demo/wxFileDialog.py @@ -1,5 +1,6 @@ from wxPython.wx import * +import os #--------------------------------------------------------------------------- @@ -8,12 +9,18 @@ wildcard = "Python source (*.py)|*.py|" \ "All files (*.*)|*.*" def runTest(frame, nb, log): - dlg = wxFileDialog(frame, "Choose a file", "", "", wildcard, wxOPEN|wxMULTIPLE) + log.WriteText("CWD: %s\n" % os.getcwd()) + dlg = wxFileDialog(frame, "Choose a file", os.getcwd(), "", wildcard, + wxOPEN + | wxMULTIPLE + #| wxCHANGE_DIR + ) if dlg.ShowModal() == wxID_OK: paths = dlg.GetPaths() log.WriteText('You selected %d files:' % len(paths)) for path in paths: log.WriteText(' %s\n' % path) + log.WriteText("CWD: %s\n" % os.getcwd()) dlg.Destroy() #--------------------------------------------------------------------------- @@ -24,14 +31,14 @@ def runTest(frame, nb, log): +overview = """\ +This class provides the file chooser dialog. +""" +if __name__ == '__main__': + import sys,os + import run + run.main(['', os.path.basename(sys.argv[0])]) - - - -overview = """\ -This class represents the file chooser dialog. - -"""