Tkinter and Greek Symbols
Martin v. Loewis
martin at v.loewis.de
Fri Feb 15 03:16:49 EST 2002
jmsun at bioeng.ucsd.edu (Jeffrey) writes:
> You can probably guess what I want to know from the title. But hey
> I'll explain anyways :) I want to be able to display Greek Symbols
> like alpha and theta.
import Tkinter
l = Tkinter.Label(text = u"\N{GREEK SMALL LETTER ALPHA}")
l.pack()
l.tk.mainloop()
If you happen to know that GREEK SMALL LETTER ALPHA is \u0391, you can
use that as well. If you have an editor that supports utf-8, you can
use unicode("<utf-8 encoding of the greek text>", "utf-8") instead
of the Unicode literal.
HTH,
Martin
More information about the Python-list
mailing list