def vp_start_gui(): '''Starting point when module is the main routine.''' global val, w, root global prog_location prog_call = sys.argv[0] prog_location = os.path.split(prog_call)[0] root = tk.Tk() configure_support.set_Tk_var() top = ToplevelSetting(root) configure_support.init(root, top) root.mainloop()
def create_ToplevelSetting(rt, *args, **kwargs): '''Starting point when module is imported by another module. Correct form of call: 'create_ToplevelSetting(root, *args, **kwargs)' .''' global w, w_win, root global prog_location prog_call = sys.argv[0] prog_location = os.path.split(prog_call)[0] #rt = root root = rt w = tk.Toplevel(root) configure_support.set_Tk_var() top = ToplevelSetting(w) configure_support.init(w, top, *args, **kwargs) return (w, top)