问题
This is a really bizarre problem. I don't know where to start. I am on OS X, Terminal.app, UTF-8. If I type cyrillic in bash, it works fine. If I open python2.7, I can type cyrillic characters fine. If I open python3.4 (macports), I can type
print( '
but when I switch my keyboard to cyrillic, none of my cyrillic keypresses register. I can still type numerals and other symbols, but not the cyrillic letters. What is going on? How can I get the console to register cyrillic keypresses?
I can pipe cyrillic text to python3.4. This is just a problem with the console.
EDIT: I also have a macports installation of python3.2, and it fails in the exact same way.
回答1:
Thanks to Martijn Pieters who solved this issue for me (see comments above). This does appear to be an issue with Macports. I did not want to use homebrew for other reasons, but the buildout.python project seems to do the trick.
来源:https://stackoverflow.com/questions/29230725/python-3-4-2-typing-cyrillic-fails