[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] create graphical box for text programme
hello its my first time on this site so i would just like to say hello to
every body my name is nige and im just starting out with python i have wrote
a programme and i would like to be able to run it in a graphical box i will
give you a small example of the text programme i have as follows
s = raw_input ("Hello whats your name? ")
if s=='melvyn':
print "your my boss's Dad the one they call in indian language DEEP
THOUGHT LITTLE HORSE"
if s=='carol':
print "ahhh you are my boss's mom the one they call WREATH WOMAN"
if s=='rebecca':
print "you must be the FLORIST WOMAN"
if s=='gareth':
print "you must be the one they call the TRUCKER"
if s=='carmel':
print "you must be my boss's wife"
s = raw_input ("what do you do for a living? ")
print "Ahh thats easy you dont do much then",s,"my boss is a Truck driver."
well i had a look at a couple of examples of a box the one i saw is actually
"tkinter" the code is as follows
from Tkinter import *
root = Tk()
cv = Canvas(root, width=400, height=300, bg="blue")
cv.pack()
cv.create_rectangle(50,30,320,290,outline="yellow",fill="red",width=10)
mainloop()
any way what i would like to do is create a programme that would run my text
programme from this graphical box i tried to add the code for the box to the
top of my text programme but when i run it i get the graphical box come up
and my text programme will not work untill i kill the box. i would be graet
full if some body can help me acheive this.
thanks nige