From 2364cd015798ac6d7bf2e224039d83a2b049a9d6 Mon Sep 17 00:00:00 2001 From: Holger Frey Date: Fri, 15 Jul 2016 12:46:16 +0200 Subject: [PATCH] restructured module into package --- array2xls/__init__.py | 13 +++++++++++++ array2xls.py => array2xls/gui.py | 11 ++--------- 2 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 array2xls/__init__.py rename array2xls.py => array2xls/gui.py (86%) diff --git a/array2xls/__init__.py b/array2xls/__init__.py new file mode 100644 index 0000000..4a271a8 --- /dev/null +++ b/array2xls/__init__.py @@ -0,0 +1,13 @@ +import tkinter as tk + +import gui + + +if __name__ == '__main__': + root = tk.Tk() + app = gui.Application(master=root) + app.mainloop() + try: + root.destroy() + except tk.TclError: + pass \ No newline at end of file diff --git a/array2xls.py b/array2xls/gui.py similarity index 86% rename from array2xls.py rename to array2xls/gui.py index 704c181..e2cd678 100644 --- a/array2xls.py +++ b/array2xls/gui.py @@ -20,7 +20,7 @@ class StatusBar(tk.Frame): class Application(tk.Frame): - def __init__(self, master=None): + def __init__(self, master): #master.geometry("500x500") master.minsize(height=100, width=100) tk.Frame.__init__(self, master) @@ -43,11 +43,4 @@ class Application(tk.Frame): print(type(result), ':', result) -if __name__ == '__main__': - root = tk.Tk() - app = Application(master=root) - app.mainloop() - try: - root.destroy() - except tk.TclError: - pass +