]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/wxFileDialog_Save.py
Oops. Check in the correct Makefile.in.
[wxWidgets.git] / wxPython / demo / wxFileDialog_Save.py
CommitLineData
1fded56b
RD
1
2from wxPython.wx import *
3import os
4
5#---------------------------------------------------------------------------
6
7wildcard = "Python source (*.py)|*.py|" \
8 "Compiled Python (*.pyc)|*.pyc|" \
9 "SPAM files (*.spam)|*.spam|" \
10 "Egg file (*.egg)|*.egg|" \
11 "All files (*.*)|*.*"
12
13def runTest(frame, nb, log):
14 log.WriteText("CWD: %s\n" % os.getcwd())
15 dlg = wxFileDialog(frame, "Save file as...", os.getcwd(), "", wildcard,
16 wxSAVE
17 #| wxCHANGE_DIR
18 )
19 dlg.SetFilterIndex(2)
20 if dlg.ShowModal() == wxID_OK:
21 path = dlg.GetPath()
22 log.WriteText('You selected "%s"' % path)
23 log.WriteText("CWD: %s\n" % os.getcwd())
24 dlg.Destroy()
25
26#---------------------------------------------------------------------------
27
28
29
30
31
32
33
34overview = """\
35This class provides the file chooser dialog.
36
37"""
38
39
40if __name__ == '__main__':
41 import sys,os
42 import run
43 run.main(['', os.path.basename(sys.argv[0])])
44