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