All pastes #483183 Raw Edit

tjansson

public python v1 · immutable
·published 2007-05-11 16:27 UTC
rendered paste body
#!/usr/bin/python"""\Graphical interface for geocol12Thomas R. N. Janssontjansson@fys.ku.dk"""from Tkinter import *class App:	def __init__(self, master):		frame = Frame(master)		frame.grid()		self.button = Button(frame, text="QUIT", fg="red", command=frame.quit)		self.button.grid()				self.hi_there = Button(frame, text="Hello", command=self.say_hi)		self.hi_there.grid()				self.lpot= IntVar()		self.lpotCheckbutton = Checkbutton(master, text="LPOT", variable=self.lpot)		self.lpotCheckbutton.grid()				self.lncol = IntVar()		self.lncolCheckbutton = Checkbutton(master, text="LNCOL", variable=self.lncol)		self.lncolCheckbutton.grid()				self.runtitle = StringVar()		self.runtitleEntry = Entry(master, state=NORMAL, text="Title", textvariable=self.runtitle)		self.runtitleEntry.grid()				self.refsys = IntVar()		self.refsysScale = Scale(master, from_=0, to=10, textvariable=self.refsys)		self.refsysScale.grid()				def say_hi(self):			print "hi there, everyone!"				#self.outputfile = StringVar()		#self.outputfileEntry = Entry(master, state=NORMAL, text="Title", textvariable=self.outputfile)		#self.outputfileEntry.grid()				#self.file = open(self.outputfile, wU)		#if file:		#	wordlist = [self.runtitle, ]		#	file.writelines(wordlist)		#	file.close		#else:		#	print "Error opening file"root = Tk()app = App(root)root.mainloop()