I need to code an educational writing game in Python. The GUI would first presen
ID: 661131 • Letter: I
Question
I need to code an educational writing game in Python.
The GUI would first present a Home/Select screen, which lets the user choose the Reading Library or the Writing Workshop.
From the Writing Workshop, the user can then choose one of three activities:
1) poem collage
2)word medley
3)sentence tree
Finally, he or she has the option to post your writing to a live server.
Can you help me with this homework project. It does not need to be fully functional, just a basic GUI at this point with the above specifications.
Explanation / Answer
import sys try: import pygtk pygtk.require("2.0") except: pass try: import gtk import gtk.glade except: sys.exit(1) class HellowWorldGTK: """This is an Hello World GTK application""" def __init__(self): #Set the Glade file self.gladefile = "pyhelloworld.glade" self.wTree = gtk.glade.XML(self.gladefile) #Create our dictionay and connect it dic = { "on_btnHelloWorld_clicked" : self.btnHelloWorld_clicked, "on_MainWindow_destroy" : gtk.main_quit } self.wTree.signal_autoconnect(dic) def btnHelloWorld_clicked(self, widget): print "Hello World!" if __name__ == "__main__": hwg = HellowWorldGTK() gtk.main()
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.