Python Tkinter Entry. I can't type Korean in to the Entry field

牧云@^-^@ 提交于 2019-12-07 07:33:46

问题


I am making a p2p chat program in Python 3 using Tkinter. I can paste Korean text into the Entry widget and send to the other user and it works.

However, I can't 'type' Korean into the widget directly.

Why is this happening?

I am using Mac OS X Yosemite.


回答1:


I would recommend using the translate module by pip install translate into your python shell. It uses google translate offline as a python module. It would work something like this: $ translate-kor -t zh "This is a pen."

More details on translate can be found at the link https://pypi.org/project/translate/.

Once you have this, you can probably integrate it into your chat program, as you could easily save the translation to a variable. This is a viable alternative if you are not able to update your tkinter python module.



来源:https://stackoverflow.com/questions/33603442/python-tkinter-entry-i-cant-type-korean-in-to-the-entry-field

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!