]>
Commit | Line | Data |
---|---|---|
cf694132 RD |
1 | |
2 | from wxPython.wx import * | |
1fded56b | 3 | import os |
cf694132 RD |
4 | |
5 | #--------------------------------------------------------------------------- | |
6 | ||
eb0f373c RD |
7 | wildcard = "Python source (*.py)|*.py|" \ |
8 | "Compiled Python (*.pyc)|*.pyc|" \ | |
9 | "All files (*.*)|*.*" | |
10 | ||
cf694132 | 11 | def runTest(frame, nb, log): |
1fded56b RD |
12 | log.WriteText("CWD: %s\n" % os.getcwd()) |
13 | dlg = wxFileDialog(frame, "Choose a file", os.getcwd(), "", wildcard, | |
14 | wxOPEN | |
15 | | wxMULTIPLE | |
16 | #| wxCHANGE_DIR | |
17 | ) | |
cf694132 | 18 | if dlg.ShowModal() == wxID_OK: |
1e4a197e RD |
19 | paths = dlg.GetPaths() |
20 | log.WriteText('You selected %d files:' % len(paths)) | |
21 | for path in paths: | |
22 | log.WriteText(' %s\n' % path) | |
1fded56b | 23 | log.WriteText("CWD: %s\n" % os.getcwd()) |
cf694132 RD |
24 | dlg.Destroy() |
25 | ||
26 | #--------------------------------------------------------------------------- | |
27 | ||
28 | ||
29 | ||
30 | ||
31 | ||
32 | ||
33 | ||
1fded56b RD |
34 | overview = """\ |
35 | This class provides the file chooser dialog. | |
cf694132 | 36 | |
1fded56b | 37 | """ |
cf694132 RD |
38 | |
39 | ||
1fded56b RD |
40 | if __name__ == '__main__': |
41 | import sys,os | |
42 | import run | |
43 | run.main(['', os.path.basename(sys.argv[0])]) | |
cf694132 | 44 |