[Python-Dev] Unicode literals in Python 2.7 (original) (raw)

Alexander Walters tritium-list at sdamon.com
Tue Apr 28 22:22:50 CEST 2015


does this not work for you?

from future import unicode_literals

On 4/28/2015 16:20, Adam Bartoš wrote:

Hello,

is it possible to somehow tell Python 2.7 to compile a code entered in the interactive session with the flag PyCFSOURCEISUTF8 set? I'm considering adding support for Python 2 in my package (https://github.com/Drekin/win-unicode-console) and I have run into the fact that when u"α" is entered in the interactive session, it results in u"\xce\xb1" rather than u"\u03b1". As this seems to be a highly specialized question, I'm asking it here. Regards, Drekin


Python-Dev mailing list Python-Dev at python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/tritium-list%40sdamon.com

-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20150428/525cbe12/attachment-0001.html>



More information about the Python-Dev mailing list