Chinese language support of Python?

Leon Wang guidance_shanghai at yahoo.com.cn
Sat Jul 6 10:19:45 EDT 2002


How can enable Chinese language support of Python? In IDLE, even can
not save the source file if contain any >128 ASCII code charactors. I
want to set the Window title in Chinese, but the bit7 is masked by
Tkinter:

from Tkinter import *
from Tkconstants import *

def filenew():
 print 'filenew'
def fileopen():
 print 'fileopen'
def fileexit():
 print 'fileexit'
def helpabout():
 print 'helpabout'
root=Tk()
menu = Menu(root)
root.config(menu=menu)
root.title('中文') # this is Chinese

filemenu = Menu(menu)
menu.add_cascade(label="File", menu=filemenu)
filemenu.add_command(label="New", command=filenew)
filemenu.add_command(label="Open...", command=fileopen)
filemenu.add_separator()
filemenu.add_command(label="Exit", command=fileexit)

helpmenu = Menu(menu)
menu.add_cascade(label="Help", menu=helpmenu)
helpmenu.add_command(label="About...", command=helpabout)

#frame=Frame(root)
#frame.master.title('ETUS')
#frame.pack()
mainloop()



More information about the Python-list mailing list