Re: ucs2 and ucs4 python
On May 15, 7:42 pm, Miki Tebeka miki.teb...@gmail.com 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...@gmail.comhttp://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... But thanks for your help :) Alan -- http://mail.python.org/mailman/listinfo/python-list
Re: ucs2 and ucs4 python
There is one problem though... when i start script with shebang like #!/opt/bin/python and then try to run the script i get: /opt/bin/python^M: bad interpreter: No such file or directory /opt/bin/python /opt/bin/python2 /opt/bin/python2.7 all start this new version of python, but none of those work in shebang Alan -- http://mail.python.org/mailman/listinfo/python-list
Re: ucs2 and ucs4 python
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...@gmail.comhttp://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 -- http://mail.python.org/mailman/listinfo/python-list
Re: ucs2 and ucs4 python
On 16.5.2012 10:36, zayatzz wrote: /opt/bin/python^M: bad interpreter: No such file or directory Your script has CRLF end-of-lines. Change it to plain Unix LF. Matěj -- http://mail.python.org/mailman/listinfo/python-list
Re: ucs2 and ucs4 python
On Wed, May 16, 2012 at 6:36 PM, zayatzz alan.kesselm...@gmail.com wrote: There is one problem though... when i start script with shebang like #!/opt/bin/python and then try to run the script i get: /opt/bin/python^M: bad interpreter: No such file or directory You have a Windows end-of-line \r\n instead of a Unix end-of-line \n - how are you editing the files? If nothing else, run the script through dos2unix or equivalent before executing. ChrisA -- http://mail.python.org/mailman/listinfo/python-list
Re: ucs2 and ucs4 python
On May 16, 11:50 am, Matej Cepl mc...@redhat.com wrote: On 16.5.2012 10:36, zayatzz wrote: /opt/bin/python^M: bad interpreter: No such file or directory Your script has CRLF end-of-lines. Change it to plain Unix LF. Matěj Thanks :) but i have no idea what that means or how to achieve that. Alan -- http://mail.python.org/mailman/listinfo/python-list
Re: ucs2 and ucs4 python
On 05/16/2012 05:20 AM, zayatzz wrote: On May 16, 11:50 am, Matej Cepl mc...@redhat.com wrote: On 16.5.2012 10:36, zayatzz wrote: /opt/bin/python^M: bad interpreter: No such file or directory Your script has CRLF end-of-lines. Change it to plain Unix LF. Matěj Thanks :) but i have no idea what that means or how to achieve that. Alan See in the echo of the shebang line the ^M at the end ? That's a carriage return, hex(0d). Unix/Linux use a single linefeed (hex(0a)) at the end of the line. At some point, you probably edited this file with a Windows (aka DOS) editor, and it used the CRLF form (hex(0d0a)), carriage return/line feed at the end of each line. Your Linux text editor probably has a menu option to convert them back to simple linefeeds, but if not, your Linux/Unix probably has a utility dos2unix which can do the job. -- DaveA -- http://mail.python.org/mailman/listinfo/python-list
ucs2 and ucs4 python
Hello I tried using one compiled library and got this error: ImportError: /home/alan/Downloads/pdftron/PDFNetC64/Lib/ _PDFNetPython2.so: undefined symbol: PyUnicodeUCS2_AsUTF8String I googled around and found some info about the meaning of the error. The creators of PDFNet suggested i install UCS2 python next to my UCS4 version to try their library. 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. Alan -- http://mail.python.org/mailman/listinfo/python-list
Re: ucs2 and ucs4 python
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...@gmail.com http://pythonwise.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list