Print Special Symbols in Tk GUI
Bart Nessux
bart_nessux at hotmail.com
Fri Aug 13 07:59:58 EDT 2004
vincent wehren wrote:
> "Bart Nessux" <bart_nessux at hotmail.com> schrieb im Newsbeitrag
> news:cfh9pr$fnb$1 at solaris.cc.vt.edu...
>
>>Using tkinter to create a Python version of Microsoft's winver. Works
>>great... how can I print the copyright symbol (c) and the registered (R)
>>symbol into the GUI?
>
>
> Consider using unicode(\u) or unicode name (\n{name goes here} escapes:
>
> import tkMessageBox
> import Tkinter
> root = Tkinter.Tk()
> root.withdraw()
> copyright_symbol = u"\u00A9"
> # or use: copyright_symbol = u"\N{COPYRIGHT SIGN}"
> registered_symbol = u"\u00AE"
> # or use: registered_symbol = u"\N{REGISTERED SIGN}"
> msg = u"Copyright: %s, Registered: %s" % (copyright_symbol,
> registered_symbol)
> tkMessageBox.showinfo("Info", msg)
> #root.mainloop()
>
> Regards,
> --
>
> Vincent Wehren
Thanks Vincent... that works great.
More information about the Python-list
mailing list