]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/wxFileDialog.py
Removed deprecation warnings in OGL and Gizmos
[wxWidgets.git] / wxPython / demo / wxFileDialog.py
index a3c753e45b07c721993e29b0f13e0c3a795616fb..a73dc0697057ec219ba84892bb1c6474a72824dd 100644 (file)
@@ -1,6 +1,5 @@
 
 from wxPython.wx import *
-import string
 
 #---------------------------------------------------------------------------
 
@@ -11,8 +10,10 @@ wildcard = "Python source (*.py)|*.py|" \
 def runTest(frame, nb, log):
     dlg = wxFileDialog(frame, "Choose a file", "", "", wildcard, wxOPEN|wxMULTIPLE)
     if dlg.ShowModal() == wxID_OK:
-        for path in dlg.GetPaths():
-            log.WriteText('You selected: %s\n' % path)
+        paths = dlg.GetPaths()
+        log.WriteText('You selected %d files:' % len(paths))
+        for path in paths:
+            log.WriteText('           %s\n' % path)
     dlg.Destroy()
 
 #---------------------------------------------------------------------------