wharley Posted May 10, 2012 Report Share Posted May 10, 2012 (edited) como rodar este código no python 3.2?from Tkinter import * class App: def __init__(self, master): frame = Frame(master) frame.pack() self.button = Button(frame, text="QUIT", fg="red", command=frame.quit) self.button.pack(side=LEFT) self.hi_there = Button(frame, text="Hello", command=self.say_hi) self.hi_there.pack(side=LEFT) def say_hi(self): print "hi there, everyone!" root = Tk() app = App(root) root.mainloop() Edited May 10, 2012 by wharley Quote Link to comment Share on other sites More sharing options...
0 Jhonas Posted May 14, 2012 Report Share Posted May 14, 2012 No bloco de notas salve seu código como programa.py.execute o comando :python programa.pyobs: onde programa é o nome do seu programaabraço Quote Link to comment Share on other sites More sharing options...
Question
wharley
como rodar este código no python 3.2?
from Tkinter import *
class App:
def __init__(self, master):
frame = Frame(master)
frame.pack()
self.button = Button(frame, text="QUIT", fg="red",
command=frame.quit)
self.button.pack(side=LEFT)
self.hi_there = Button(frame, text="Hello",
command=self.say_hi)
self.hi_there.pack(side=LEFT)
def say_hi(self):
print "hi there, everyone!"
root = Tk()
app = App(root)
root.mainloop()
Edited by wharleyLink to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.