How to dectect UCS4 Python at runtime?

D

Daniel Dittmar

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
 
A

Andreas Jung

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top