How to dectect UCS4 Python at runtime?

Andreas Jung andreas at andreas-jung.com
Thu Aug 7 13:45:05 CEST 2003


sys.maxunicode return 65535 for ucs-2, but 1114111 for ucs-4...maybe that's
sufficent for you.

Andreas

--On Donnerstag, 7. August 2003 12:00 Uhr +0200 Daniel Dittmar 
<daniel.dittmar at sap.com> wrote:

> I'm trying to detect whether the Python currently running has been
> compiled for UCS2 or UCS4.
>
> I need this because I'm distributing a C extension. I've choosen to pack
> the binaries for all the Python versions into one download and then
> decide at runtime which one to load. And with RedHat compiling Python for
> UCS4, I'll have to do the same for the unicode variants.
>
> Daniel
>
> --
> Daniel Dittmar
> SAP DB, SAP Labs Berlin
> http://www.sapdb.org
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list









More information about the Python-list mailing list