tkFileDialog.askopenfilenames not regonizing -multiple option

Martin Franklin mfranklin1 at gatwick.westerngeco.slb.com
Fri Dec 5 14:46:11 CET 2003


On Fri, 2003-12-05 at 13:32, Tim Williams wrote:
> Hi.
> 
> I'm using Python 2.3 and trying to use tkFileDialog to get a list of
> files. I get a message about the '-multiple' option is not a valid
> option in the call to Open.
> 
> 
> Python 2.3 (#1, Aug  4 2003, 10:43:11) 
> [GCC 3.2 20020903 (Red Hat Linux 8.0 3.2-7)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from Tkinter import *
> >>> import tkFileDialog
> >>> root=Tk()
> >>> files=tkFileDialog.askopenfilenames()
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "tkFileDialog.py", line 133, in askopenfilenames
>     return Open(**options).show()
>   File "tkCommonDialog.py", line 52, in show
>     s = w.tk.call(self.command, *w._options(self.options))
> _tkinter.TclError: bad option "-multiple": must be -defaultextension,
> -filetypes, -initialdir, -initialfile, -parent, or -title
> 
> 
> 
> ~> tclsh
> % info tclversion
> 8.3
> 

You will need to upgrade to tcl/tk 8.4 as the multiple option was not
added until then.

Regards,
Martin.


> Thanks for any help.
-- 
Martin Franklin <mfranklin1 at gatwick.westerngeco.slb.com>






More information about the Python-list mailing list