[pygtk] Win32 file chooser

Nikos Kouremenos kourem at gmail.com
Mon Mar 6 09:51:18 WST 2006


it had a small typo. now it works at it should. I cannot reproduce
your TB. what what the file name and path you selected?

btw. you can always use the GTK filechooser which in 2.6+ is very good
(2.4 and before it made you think it's 1980)

On 3/6/06, John Pye <john.pye at student.unsw.edu.au> wrote:
> Hi all,
>
> Has anyone had any success getting the following example from the FAQ to
> run?
>
> http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq21.013.htp
>
> For me, running with Python 2.4 on Win2k, it doesn't work:
>
> > Exception in thread Thread-12:
> > Traceback (most recent call last):
> >   File "C:\Python24\lib\threading.py", line 442, in __bootstrap
> >     self.run()
> >   File "C:\Python24\lib\threading.py", line 422, in run
> >     self.__target(*self.__args, **self.__kwargs)
> >   File "examplewinfile.py", line 12, in run_dialog
> >     s = winfilechooser._test("This is a dialog", "C:\\WINDOWS")
> >   File "g:\ascend\pygtk\interface\winfilechooser.py", line 132, in _test
> >     if win32gui.GetOpenFileName(cs1.data):
> > TypeError: Argument must be a 88-byte string
>
>
> Any suggestions?
>
> Cheers
> JP
>
> --
> John Pye
> School of Mechanical and Manufacturing Engineering
> The University of New South Wales
> Sydney  NSW 2052  Australia
> t +61 2 9385 5127
> f +61 2 9663 1222
> mailto:john.pye_AT_student_DOT_unsw.edu.au
> http://pye.dyndns.org/
>
> _______________________________________________
> pygtk mailing list   pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>


--
Nikos Kouremenos


More information about the pygtk mailing list