[Tutor] Available filetypes for AskSaveasfilenam in Tkinter?

John Fouhy john at fouhy.net
Fri Jan 23 01:52:44 CET 2009


2009/1/23 Wayne Watson <sierra_mtnview at sbcglobal.net>:
> How do I know what file types are available for asksaveasfilename? Suppose
> one isn't available, for example, FITS. How do I get it?

You pass the file types as an argument to the function.

tkFileDialog.asksaveasfilename(filetypes=[('Text', '*.txt'), ('Stuff',
'*.stf'), ('Et cetera', '*.etc')])

http://www.pythonware.com/library/tkinter/introduction/x1164-data-entry.htm

-- 
John.


More information about the Tutor mailing list