Entradas

Mostrando entradas de septiembre, 2017

Spiderman o0o

from Tkinter import * VentanaP = Tk() VentanaP.title("Spiderman o0o") poly = Canvas(VentanaP, width=400, heigh=400, bg='yellow') poly.pack() poly.create_polygon(100,0, 110,0, 110,30, 120,30, 120,40, 130,40, 130,50, 140,50, 140,60, 150,60, 150,70, 170,70, 170,80, 180,80, 180,90, 190,90, 190,100, 200,100, 200,120, 190,120, 190,130, 170,130,170,140,180,140,180,160,170,160,170,170,160,170,160,180,140,180,140,190,150,190,150,200,160,200,160,210,170,210,170,280,160,280,160,290,150,290,150,300,130,300,130,310,80,310,80,300,60,300,60,290,50,290,50,280,40,280,40,210,50,210,50,200,60,200,60,190,70,190,70,180,50,180,50,170,40,170,40,160,30,160,30,140,40,140,40,130,20,130,20,120,10,120,10,100,20,100,20,90,30,90,30,80,40,80,40,70,60,70,60,60,70,60,70,50,80,50,80,40,90,40,90,30,100,30, fill="black", outline='black') poly.create_polygon( 100,40,90,40,90,50,80,50,80,60,70,60,70,70,60,70,60,80,40,80,40,90,30,90,30,100,20,100,     20,120,

Una linda y pequeña figurita

Imagen
from Tkinter import * v0 = Tk() v1 = Toplevel(v0) v2 = Toplevel(v0) v3 = Toplevel(v0) v4 = Toplevel(v0) v5 = Toplevel(v0) v6 = Toplevel(v0) v7 = Toplevel(v0) v8 = Toplevel(v0) v9 = Toplevel(v0) v0.title("Figuras") v1.title("Circulo") v2.title("Rectangulo") v3.title("Lineas") v4.title('Queshito :3') v5.title('Arco') v6.title('Arco y Queshito') v7.title('Texto') v8.title('Poligono') v9.title('Wea') v1.protocol("WM_DELETE_WINDOW", "onexit") v2.protocol("WM_DELETE_WINDOW", "onexit") v3.protocol("WM_DELETE_WINDOW", "onexit") v4.protocol("WM_DELETE_WINDOW", "onexit") v5.protocol("WM_DELETE_WINDOW", "onexit") v6.protocol("WM_DELETE_WINDOW", "onexit") v7.protocol("WM_DELETE_WINDOW", "onexit") v8.protocol("WM_DELETE_WINDOW", "onexit") v9.protocol(&quo

Trabajo en clase OwO

Imagen
from Tkinter import * v0 = Tk() v1 = Toplevel(v0) v2 = Toplevel(v0) v3 = Toplevel(v0) v4 = Toplevel(v0) v5 = Toplevel(v0) v6 = Toplevel(v0) v7 = Toplevel(v0) v8 = Toplevel(v0) v0.title( "Figuras" ) v1.title( "Circulo" ) v2.title( "Rectangulo" ) v3.title( "Lineas" ) v4.title( 'Queshito :3' ) v5.title( 'Arco' ) v6.title( 'Arco y Queshito' ) v7.title( 'Texto' ) v8.title( 'Texto' ) v1.protocol( "WM_DELETE_WINDOW" , "onexit" ) v2.protocol( "WM_DELETE_WINDOW" , "onexit" ) v3.protocol( "WM_DELETE_WINDOW" , "onexit" ) v4.protocol( "WM_DELETE_WINDOW" , "onexit" ) v5.protocol( "WM_DELETE_WINDOW" , "onexit" ) v6.protocol( "WM_DELETE_WINDOW" , "onexit" ) v7.protocol( "WM_DELETE_WINDOW" , "onexit" ) v8.protocol( "WM_DELETE_WINDOW" , "onexit" ) def mostrar(ven

Juntando el queshito y el arco

Imagen
from Tkinter import * v0 = Tk() v1 = Toplevel(v0) v2 = Toplevel(v0) v3 = Toplevel(v0) v4 = Toplevel(v0) v5 = Toplevel(v0) v6 = Toplevel(v0) v0.title("Figuras") v1.title("Circulo") v2.title("Rectangulo") v3.title("Lineas") v4.title('Queshito :3') v5.title('Arco') v6.title('Arco y Queshito') v1.protocol("WM_DELETE_WINDOW", "onexit") v2.protocol("WM_DELETE_WINDOW", "onexit") v3.protocol("WM_DELETE_WINDOW", "onexit") v4.protocol("WM_DELETE_WINDOW", "onexit") v5.protocol("WM_DELETE_WINDOW", "onexit") v6.protocol("WM_DELETE_WINDOW", "onexit") def mostrar(ventana): ventana.deiconify() def ocultar(ventana): ventana.withdraw() def ejecutar(f): v0.after(200, f) v0.config(bg="black") v0.geometry("288x300") def circulo(ventana):     v1.deiconify()     circul

Agregando figuras

Imagen
from Tkinter import * v0 = Tk() v1 = Toplevel(v0) v2 = Toplevel(v0) v3 = Toplevel(v0) v4 = Toplevel(v0) v5 = Toplevel(v0) v0.title("Figuras") v1.title("Circulo") v2.title("Rectangulo") v3.title("Lineas") v4.title('Queshito :3') v5.title('Arco') v1.protocol("WM_DELETE_WINDOW", "onexit") v2.protocol("WM_DELETE_WINDOW", "onexit") v3.protocol("WM_DELETE_WINDOW", "onexit") v4.protocol("WM_DELETE_WINDOW", "onexit") v5.protocol("WM_DELETE_WINDOW", "onexit") def mostrar(ventana): ventana.deiconify() def ocultar(ventana): ventana.withdraw() def ejecutar(f): v0.after(200, f) v0.config(bg="black") v0.geometry("288x300") def circulo(ventana): v1.deiconify() circulo = Canvas(v1, width=210, height=210, bg="white") circulo.pack() cuadro = circulo.create_oval(10, 10, 200, 200, width=3, fill

Tik Tak Toe

Importacion de todas las librerias------ from Tkinter import * import tkMessageBox import tkSimpleDialog def bloq(): for i in range(0,9):     lisb[i].config(state="disable") def inij(): for i in range(0,9): lisb[i].config(state="normal") lisb[i].config(bg="lightgray") lisb[i].config(text="") tab[i] = "N" global nomj1,nomj2 #indica a que variables queremos acceder nomj1=tkSimpleDialog.askstring("Jugador","Escribe el nombre del jugador 1: ") nomj2=tkSimpleDialog.askstring("Jugador","Escribe el nombre del jugador 2: ") turj.set("Turno: "+nomj1) def cam(num): global turno,nomj1,nomj2 if tab[num]=="N" and turno==0: lisb[num].config(text="X") lisb[num].config(bg="white") tab[num]="X" turno=1 turj.set("Turno: "+nomj2) elif tab[num]=="N" and tu