Quick! Hit ctrl(or command)+v

A loop, by its nature, continues. If that didn't make sense, start reading this sentence again.
 
black-forest-cake.jpg
 
Have I told you about my laugh? I think I'll tell you about my laugh.
 
#!/usr/bin/env python2
import os,sys
from Tkinter import *
location="start"
class App:
def __init__(self,master):
global location

Backgroundphoto=PhotoImage (file=os.path.normcase("assets/ibm_pc.gif")) #Draw the background
global x #Need to keep around a refrence so the garbage
x=Backgroundphoto #collector doesn't pick it up.
Backgroundlabel=Label(master, image=Backgroundphoto)
Backgroundlabel.pack()

master.bind("<Key>",self.keypress) #Start catching keypresses

self.comptext=StringVar()
self.comptext.set("Welcome to my project.\nTo navigate, please type the number of your selection.\n\n1. TestnQ. Exit")
textcontainer=Label(master, fg="green",bg="black", textvariable=self.comptext, width=68, height=26)
textcontainer.place(x=105, y=98) #Values found by guessing

def keypress(self,event):
global location
if location=="start":
if event.char=='1':
location="works"
if event.char == 'q':
print 'one'
if event.char=='Q':
location='quit'

if location=="start": #Final update of the text.
self.comptext.set("Welcome to my project.\nTo navigate, please type the number of your selection.\n\n1. TestQ. Exit")
elif location=="works":
self.comptext.set("it works!")
elif location=='quit':
root.quit()
root=Tk(className="The history of personal computers - Bratmon")
app=App(root)
root.mainloop()
root.destroy() #Needed because otherwise the window wouldn't dissappear
 
b95Bz.png
 
Is it time for Biden to impeach Obama? ( 1 2 3 4 5)
NickyJ
Mar 27, 2011 07:59 PM
by Formaldehyde
98 1,435

America: Y ur peeps b so dum? ( 1 2 3 4 5 6)
 
Takhisis -7
CivGeneral -20 I know he's not a tree...
ZeletDude -22
Virote_Considon -18
Mad Man -5
civplayah -7
Perfection -21
VRWCAgent -23
Mise -25
taillesskangaru -23
_random_ -15
Zelig -17
Double A -4
Earthling -17
Shadowbound -9
Theige -17
Owen Glyndwr -18
Dathil/Azash -17
 
Cleveland Cavaliers 9
Denver Nuggets 12
Detroit Pistons 14
Golden State Warriors 2
Houston Rockets 8
Memphis Grizzlies 10
Miami Heat 10
Milwaukee Bucks 10
Minnesota Timberwolves 10
New Jersey Nets 10
New Orleans Hornets 12
New York Knicks 10
Oklahoma City Thunder 11
Orlando Magic 10
Philadelphia 76ers 10
Phoenix Suns 10
Portland Trail Blazers 9
Toronto Raptors 22
Utah Jazz 24
 
NAME: Josip "The Bear" Indrimingo
ROLE: Assault
STATISTICS:
Str 4, Ag 3, Sta 3, Int 2
Personality: Agressive and Reliable
Traits: Former Serb Guerilla, Trigger happy, Fearless
Languages: English, Russian, Serbian
EQUIPMENT: (16/16)
IMI UZI with supressor;
+ 2 spare clips;
FN SCAR-H with ACOG sight;
+ 2 spare clips;
2 fragmentation grenades
1 flashbang grenade
Light Armor
HUD Goggles
Glowstick
Supply belt
 
Back
Top Bottom