On 11/21/2011 George Swinnerton wrote:
I found a problem with EasyGui 0.96 since changing from Python 2.5 to Python 2.7.
In my program, I use easygui.fileopenbox to obtain a source file, which is then used as the default file in the easygui.filesavebox.
In 2.5 the path is returned as a string but in 2.7 it is being returned as unicode.
This causes the comparison in line 1492 to fail.
if type(filemask) == type("abc"): # a string
Since the filemask was of type unicode (not of type string) this test was failing and causing an exception to be raised.
I've fixed the problem by changing the line to this:
if isinstance(filemask, str) or isinstance(filemask, unicode): # a string
which now works as expected.