X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/299647acac7960652aadb008775429c1f8ea9b8d..49bffb1482cd2a6a30b38280f6c9bffc72dbfe42:/wxPython/demo/FileDialog_Save.py?ds=sidebyside diff --git a/wxPython/demo/FileDialog_Save.py b/wxPython/demo/FileDialog_Save.py index 55fdae0596..1edda13224 100644 --- a/wxPython/demo/FileDialog_Save.py +++ b/wxPython/demo/FileDialog_Save.py @@ -1,7 +1,3 @@ -# 11/17/2003 - Jeff Grimmett (grimmtooth@softhome.net) -# -# o Updated for wx namespace -# import os import wx @@ -9,7 +5,7 @@ import wx #--------------------------------------------------------------------------- # This is how you pre-establish a file filter so that the dialog -# only shows the extention(s) you want it to. +# only shows the extension(s) you want it to. wildcard = "Python source (*.py)|*.py|" \ "Compiled Python (*.pyc)|*.pyc|" \ "SPAM files (*.spam)|*.spam|" \ @@ -76,10 +72,10 @@ There are two ways to get the results back from the dialog. GetFiles() returns o the file names themselves, in a Python list. GetPaths() returns the full path and filenames combined as a Python list. -One important thing to note: if you use the file extention filters, then files saved -with the filter set to something will automatically get that extention appended to them +One important thing to note: if you use the file extension filters, then files saved +with the filter set to something will automatically get that extension appended to them if it is not already there. For example, suppose the dialog was displaying the 'egg' -extention and you entered a file name of 'fried'. It would be saved as 'fried.egg.' +extension and you entered a file name of 'fried'. It would be saved as 'fried.egg.' Yum! """ @@ -87,5 +83,5 @@ Yum! if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])