from Tkinter import *
from tkFont import *
class App(Frame):
def __init__(self, master=None):
Frame.__init__(self, master)
self.pack()
self.init()
def init(self):
self.master.title("日本語タイトル")
label = Label(self, text="こんにちは、世界", fg="#800040")
label.config(font=Font(family="helvetica", weight=NORMAL, size=18))
label.pack(side=TOP, padx=5, pady=5)
button = Button(self, text="終了")
button.config(command=self.cmd_clicked)
button.pack(side=RIGHT, padx=5, pady=5)
def cmd_clicked(self):
self.master.destroy()
if __name__ == "__main__":
app=App()
app.mainloop()
Gentooでは、tcl/tkが入っていなかったんでUSEにtkを追加してpythonを再ビルドしといた。