[Python-Dev] New Py_UNICODE doc

"Martin v. Löwis" martin at v.loewis.de
Sun May 8 10:59:27 CEST 2005


M.-A. Lemburg wrote:
> I believe that it would be more appropriate to adjust the _tkinter
> module to adapt to the TCL Unicode size rather than
> forcing the complete Python system to adapt to TCL - I don't
> really see the point in an optional extension module
> defining the default for the interpreter core.

_tkinter currently supports, for a UCS-2 Tcl, both UCS-2 and UCS-4
Python. For an UCS-4 Tcl, it requires Python also to be UCS-4.
Contributions to support the missing case are welcome.

> At the very least, this should be a user controlled option.

It is: by passing --enable-unicode=ucs2, you can force Python
to use UCS-2 even if Tcl is UCS-4, with the result that
_tkinter cannot be built anymore (and compilation fails
with an #error).

> Otherwise, we might as well use sizeof(wchar_t) as basis
> for the default Unicode size. This at least, would be
> a much more reasonable choice than whatever TCL uses.

The goal of the build process is to provide as many extension
modules as possible (given the set of headers and libraries
installed), and _tkinter is an important extension module
because IDLE depends on it.

Regards,
Martin


More information about the Python-Dev mailing list