]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxFileDialog_Save.py
2 from wxPython
.wx
import *
5 #---------------------------------------------------------------------------
7 wildcard
= "Python source (*.py)|*.py|" \
8 "Compiled Python (*.pyc)|*.pyc|" \
9 "SPAM files (*.spam)|*.spam|" \
10 "Egg file (*.egg)|*.egg|" \
13 def runTest(frame
, nb
, log
):
14 log
.WriteText("CWD: %s\n" % os
.getcwd())
15 dlg
= wxFileDialog(frame
, "Save file as...", os
.getcwd(), "", wildcard
,
20 if dlg
.ShowModal() == wxID_OK
:
22 log
.WriteText('You selected "%s"' % path
)
23 log
.WriteText("CWD: %s\n" % os
.getcwd())
26 #---------------------------------------------------------------------------
35 This class provides the file chooser dialog.
40 if __name__
== '__main__':
43 run
.main(['', os
.path
.basename(sys
.argv
[0])])