I am using the following snippet of code adopted from here I need it to wait for the user to choose an option and then fill that into the rest of the code (to add to an xml file -a metadata generator program I am working on with details here)
from Tkinter import *
def print_it(event):
print var.get()
root = Tk()
var = StringVar()
var.set("Set Copyright for: " + str(File))
OptionMenu(root, var, "Internal Use Only","Internal & Community Use","Whole Of Government Use", "Project Specific Licence","No licence constraints on ATGIS/TRC use", command=print_it).pack()
root.mainloop()
should this be part of the def above?
for node in tree.findall('.//copyright'):
node.text = str(var) # not sure how to call the output.