Thursday, February 3, 2011

I created a new GUI for work.

I created a GUI to assist Public Works in calculating Protest Extents.

from Tkinter import *

def exclusion():
    AreaOfSubject=float(AreaSubject.get())
    AreaROWinBuffer=float(AreaROW.get())
    GrossAcresArea=float(GrossAcres.get())
    theProtestArea=float(ProtestArea.get())
    NetAcres=float(GrossAcresArea-(AreaOfSubject+AreaROWinBuffer))
   
    print("Total area of exclusions =  %0.2f " % float(AreaOfSubject+AreaROWinBuffer))
    print("Net Acres = %0.2f "%NetAcres)
    print("Extent of Protest is %0.2f" %float(theProtestArea/NetAcres))
   

root=Tk()

Label(root,text="Gross acres including subject property and ROW").pack()
GrossAcres=Entry(root)
GrossAcres.pack()

Label(root,text="Area of Subject Property").pack()
AreaSubject=Entry(root)
AreaSubject.pack()

Label(root,text="Area of Street ROW").pack()
AreaROW=Entry(root)
AreaROW.pack()

Label(root,text="Area of Protesting Properties").pack()
ProtestArea=Entry(root)
ProtestArea.pack()

btn1=Button(root,text="Protest Extent",command=exclusion)
btn1.pack()

root.mainloop()

Followers

Blog Archive

About Me

My photo
Biking helps me to cope with life.