ucs2 and ucs4 python

Stefan Behnel stefan_ml at behnel.de
Wed May 16 04:43:06 EDT 2012


zayatzz, 16.05.2012 10:22:
> On May 15, 7:42 pm, Miki Tebeka wrote:
>>> Can someone point me towards a resource or two which will tell me how
>>> to do this - im not very good with whole linux/servers stuff. Im using
>>> ubuntu linux - if that makes any difference.
>>
>> Did not test, but this is the direction I would take:
>> * Download Python sources
>> * Open Terminal
>> * Run the following commands in the Terminal window
>>   - sudo apt-get build-dep python
>>   - tar -xjf Python-2.7.3.tar.bz2
>>   - cd Python-2.7.3
>>   - ./configure --prefix=/opt --enable-unicode=ucs2 && make
>>   - sudo make install
>> * Now you should have /opt/bin/python with ucs2
>>
>> HTH
>> --
>> Miki Tebeka <miki.teb... at gmail.com>http://pythonwise.blogspot.com
> 
> Thanks for reply :)
> 
> And it seems to work... When i type in
> /opt/bin/python
> import sys
> sys.maxunicode
> 
> then i get the desired answer - 65535
> 
> But it seems the work only begins now, because i cant use other python
> libraries now with this version of python and i probably have to
> install them all again somehow...

You should install "distribute" and "pip" into it, then you can use pip to
install packages directly and automatically from the Python Package Index
(PyPI), including any dependencies.

Even better, use "virtualenv" to create a local copy of your installation
and then install packages into that. This allows you to use completely
separate environments of the same Python installation, which can be very
handy for testing.

Stefan




More information about the Python-list mailing list