Ayuda por favor
Publicado por Jose (1 intervención) el 09/10/2007 13:01:05
Estoy empezando con ventanas de windows en Python y cuando ejecuto este programa no me da error pero tampoco hace nada y se supone que tiene que salir una ventana de windows con unas etiquetas, ¿por que? ya probe con extension .py y .pyw tanto con python como pythonw
from Tkinter import *
class LabelDemo( Frame ):
def __init__( self ):
Frame.__init__( self )
self.pack( expand = YES, fill = BOTH )
self.master.title( "Labels" )
self.Label1 = Label( self, text = "Label with text" )
self.Label1.pack()
self.Label2 = Label( self, text = "Labels with text and a bitmap" )
self.Label2.pack( side = LEFT )
self.Label3 = Label( self, bitmap = "warning" )
self.Label3.pack( side = LEFT )
def main():
if __name__ == "__main__":
main()
from Tkinter import *
class LabelDemo( Frame ):
def __init__( self ):
Frame.__init__( self )
self.pack( expand = YES, fill = BOTH )
self.master.title( "Labels" )
self.Label1 = Label( self, text = "Label with text" )
self.Label1.pack()
self.Label2 = Label( self, text = "Labels with text and a bitmap" )
self.Label2.pack( side = LEFT )
self.Label3 = Label( self, bitmap = "warning" )
self.Label3.pack( side = LEFT )
def main():
if __name__ == "__main__":
main()
Valora esta pregunta


0