In [9]:
from Tkinter import *
def ok_click():
pass
def finish():
root.quit()
root = Tk()
#root.geometry("600x300+350+300")
oldgui_frame = Frame(root)
oldgui_frame.grid()
# things in the first row of the GUI
L1Label = Label(oldgui_frame,text="L1: Raw Data")
L1Label.grid(row=0,column=1,columnspan=1)
L2Label = Label(oldgui_frame,text="L2: QA/QC")
L2Label.grid(row=0,column=2,columnspan=2)
L3Label = Label(oldgui_frame,text="L3: Process")
L3Label.grid(row=0,column=4,columnspan=2)
L4Label = Label(oldgui_frame,text="L4: Gap fill")
L4Label.grid(row=0,column=6,columnspan=2)
#L5Label = Label(oldgui_frame,text="L5: Partition")
#L5Label.grid(row=0,column=8,columnspan=2)
# things in the second row of the GUI
doL1Button = Button(oldgui_frame,text="Read L1 Excel file",command=ok_click)
doL1Button.grid(row=1,column=1,columnspan=1)
doL2Button = Button(oldgui_frame,text="Do L2 QA/QC",command=ok_click)
doL2Button.grid(row=1,column=2,columnspan=2)
doL3Button = Button(oldgui_frame,text="Do L3 processing",command=ok_click)
doL3Button.grid(row=1,column=4,columnspan=2)
doL4Button = Button(oldgui_frame,text="Do L4 gap filling",command=ok_click)
doL4Button.grid(row=1,column=6,columnspan=2)
#doL5Button = Button(oldgui_frame,text="Do L5 partitioning",command=ok_click)
#doL5Button.grid(row=1,column=8,columnspan=2)
# things in the third row of the GUI
filestartLabel = Label(oldgui_frame,text='File start date')
filestartLabel.grid(row=2,column=2,columnspan=2)
fileendLabel = Label(oldgui_frame,text='File end date')
fileendLabel.grid(row=2,column=4,columnspan=2)
# things in the fourth row of the GUI
filestartValue = Label(oldgui_frame,text='No file loaded ...')
filestartValue.grid(row=3,column=2,columnspan=2)
fileendValue = Label(oldgui_frame,text='No file loaded ...')
fileendValue.grid(row=3,column=4,columnspan=2)
# things in the fifth row of the GUI
plotstartLabel = Label(oldgui_frame,text='Start date (YYYY-MM-DD)')
plotstartLabel.grid(row=4,column=2,columnspan=2)
plotstartEntry = Entry(oldgui_frame)
plotstartEntry.grid(row=4,column=4,columnspan=2)
# things in row sixth of the GUI
plotendLabel = Label(oldgui_frame,text='End date (YYYY-MM-DD)')
plotendLabel.grid(row=5,column=2,columnspan=2)
plotendEntry = Entry(oldgui_frame)
plotendEntry.grid(row=5,column=4,columnspan=2)
# things in the seventh row of the GUI
closeplotwindowsButton = Button(oldgui_frame,text="Close plot windows",command=ok_click)
closeplotwindowsButton.grid(row=6,column=1,columnspan=1)
plotL1L2Button = Button(oldgui_frame,text="Plot L1 & L2 Data",command=ok_click)
plotL1L2Button.grid(row=6,column=2,columnspan=2)
plotL3L3Button = Button(oldgui_frame,text="Plot L3 Data",command=ok_click)
plotL3L3Button.grid(row=6,column=4,columnspan=2)
plotL3L4Button = Button(oldgui_frame,text="Plot L3 & L4 Data",command=ok_click)
plotL3L4Button.grid(row=6,column=6,columnspan=2)
#plotL5L5Button = Button(oldgui_frame,text="Plot L5 Data",command=ok_click)
#plotL5L5Button.grid(row=6,column=8,columnspan=2)
# things in the eigth row of the GUI
savexL2Button = Button(oldgui_frame,text='Write L2 Excel file',command=ok_click)
savexL2Button.grid(row=7,column=2,columnspan=2)
savexL3Button = Button(oldgui_frame,text='Write L3 Excel file',command=ok_click)
savexL3Button.grid(row=7,column=4,columnspan=2)
savexL4Button = Button(oldgui_frame,text='Write L4 Excel file',command=ok_click)
savexL4Button.grid(row=7,column=6,columnspan=2)
#savexL5Button = Button(oldgui_frame,text='Write L5 Excel file',command=ok_click)
#savexL5Button.grid(row=7,column=8,columnspan=2)
# other things in the GUI
quitButton = Button(oldgui_frame,text='Quit',command=finish)
quitButton.grid(row=7,column=1,columnspan=1)
progress = Label(oldgui_frame,text='Waiting for input ...')
progress.grid(row=8,column=1,columnspan=6)
menubar = Menu(root)
filemenu = Menu(menubar,tearoff=0)
filemenu.add_command(label="Concatenate netCDF",command=ok_click)
filemenu.add_command(label="List netCDF contents",command=ok_click)
filemenu.add_command(label="nc to xls",command=ok_click)
filemenu.add_command(label="xls to nc",command=ok_click)
filemenu.add_separator()
filemenu.add_command(label="Quit",command=finish)
menubar.add_cascade(label="File",menu=filemenu)
runmenu = Menu(menubar,tearoff=0)
runmenu.add_command(label="Read L1 Excel file",command=ok_click)
runmenu.add_command(label="Do L2 QA/QC",command=ok_click)
runmenu.add_command(label="Do L3 processing",command=ok_click)
runmenu.add_command(label="Do L4 gap filling",command=ok_click)
runmenu.add_command(label="Do L5 partitioning",command=ok_click)
menubar.add_cascade(label="Run",menu=runmenu)
plotmenu = Menu(menubar,tearoff=0)
plotmenu.add_command(label="Plot L1 & L2",command=ok_click)
plotmenu.add_command(label="Plot L3",command=ok_click)
plotmenu.add_command(label="Plot L3 & L4",command=ok_click)
plotmenu.add_command(label="Plot L5",command=ok_click)
pltsummenu = Menu(menubar,tearoff=0)
pltsummenu.add_command(label="Fingerprint",command=ok_click)
pltsummenu.add_command(label="Full check",command=ok_click)
pltsummenu.add_command(label="Quick check",command=ok_click)
pltsummenu.add_command(label="Years check",command=ok_click)
plotmenu.add_cascade(label="Summary",menu=pltsummenu)
plotmenu.add_separator()
plotmenu.add_command(label="Close plots",command=ok_click)
menubar.add_cascade(label="Plot",menu=plotmenu)
utilsmenu = Menu(menubar,tearoff=0)
utilsmenu.add_command(label="Climatology",command=ok_click)
menubar.add_cascade(label="Utilities",menu=utilsmenu)
ustarmenu = Menu(menubar,tearoff=0)
ustarmenu.add_command(label="Reichstein",command=ok_click)
ustarmenu.add_command(label="Change Point Detection",command=ok_click)
ustarmenu.add_command(label="Cleverly",command=ok_click)
menubar.add_cascade(label="u* star",menu=ustarmenu)
partitionmenu = Menu(menubar,tearoff=0)
partitionmenu.add_command(label="Lloyd-Taylor",command=ok_click)
partitionmenu.add_command(label="Lasslop",command=ok_click)
partitionmenu.add_command(label="ANN",command=ok_click)
menubar.add_cascade(label="Partition",menu=partitionmenu)
root.config(menu=menubar)
In [10]:
root.mainloop()
root.destroy()
In [ ]: