2009/7/30 Johnny Vestergaard <j...@unixcluster.dk>:
> Hi,
>
> I recently upgraded from Python 2.4 to Python 2.6.2 and have had some
> unexpected issues with unicode.
>
> I had the following code working properly in 2.4:
>
> ---code start---
> import Tkinter
> import tkFileDialog
> root = Tkinter.Tk()
> input_files = tkFileDialog.askopenfilenames(filetypes = [('.TXT files',
> '.txt')], title ="Select files", multiple = 1 )
> print type(input_files)
> for file in input_files:
>   print file
> Tkinter.mainloop()
> ---code end---
>
> In 2.4 it returned a tuple containing the selected filenames, but in 2.6.2
> it seems to return a unicode string (which i cant really use for anything).
> It is the same computerm using (windows XP), only difference is the version
> of Python.
>
> Any hints to what might be going on?

It is a bug on tkFileDialog, unfortunately. The tkFileDialog in Python
2.4 is bugged too, but you were lucky that the tcl/tk version shipped
with python 2.4 for Windows doesn't show the bug.

Would you fill a bug report on bugs.python.org ?

>
>
> The output from 2.6.2:
>
> <type 'unicode'>
> {
> C
> :
> /
> D
> o
> c
> u
> m
> e
> n
> t
> s
>
> a
> n
> d
>
> s
> e
> t
> t
> i
> n
> g
> s
> ..... and continues that way
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss@python.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss
>



-- 
-- Guilherme H. Polo Goncalves
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to