Some oddities in 2.3b1, esp. with Tkinter
Martin v. Löwis
martin at v.loewis.de
Wed Apr 30 15:55:17 EDT 2003
"Russell E. Owen" <no at spam.invalid> writes:
> >> 1) A filter to remove fonts with non-ascii names (used to filter out
> >> stuff that I could not display in a pop-up menu) broke.
> >> try:
> >> unicode(fontName, 'ascii', 'strict')
> >> return True
> >> except UnicodeError:
> >> return False
[...]
> This is not true on MacOS X. I found it out the hard way. The font names
> with unicode appear to be asian fonts, at least for the most part.
I see. Please find out what fontName is, and submit a bug report to SF.
> >Are you using Debian by any chance? Otherwise, you should not see
> >a threaded Tcl.
>
> Hmm...I installed Aqua Tcl/Tk 8.4.2 from a MacOS X binary installer I
> found on the net. I'm not sure what options it was built with (though
> I'd have guessed the default ones). I can certainly install it from
> source if that would help.
Ah, so the Aqua Tcl is multi-threaded. Bad choice. There is not much
we can do: Tcl threading and Python threading are incompatible. A Tcl
interpreter can be used only from the thread in which it is created.
> >If your Tcl installation is threaded, you should use
> >tkapp.createfilehandler instead.
>
> Hmmm...so I can first try my usual way of creating a file handler, and
> if that fails, then try this?
I recommend to *always* use
tkapp.createfilehandler. _tkinter.createfilehandler is only supported
for backwards compatibility, and cannot be supported in threaded Tcl.
> I'd be happy to. Could you please tell me where the Tkinter project
> lives?
sf.net/projects/python
Regards,
Martin
More information about the Python-list
mailing list