'''
Copyright Brett Paufler (6-13-16)
because if you really need/want to license this...

The bare minimum (well, sort of) to get a TK window to screen
    Buttons do nothing
    
    root -> frame -> buttons

'''

from Tkinter import Tk, Button, Grid, Frame
from Tkconstants import N, S, E, W

#Make the Main Window (i.e. the root)
root = Tk()
root.wm_title('TK Test')

#width x height + placement as measured from upper left
root.geometry('250x250+500+200') 
root.iconbitmap(default='p_net.ico') #logo in corner
Grid.columnconfigure(root, 0, weight=1)
Grid.rowconfigure(root, 0, weight=1)

#The frame is a holding window inside root
frame = Frame(root)
frame.grid(row=0, column=0, sticky=N+S+E+W)

#This is just to trick out the example, so perhaps less than helpful to some
button_text = "  TK Test  Kitchen  Expansive  Widget   Array    "
button_text += "   Random  Text Here  because that's the way I roll"

#since the text is 100 chars long, this makes a 10x10 button grid
#the buttons do nothing
for i, char in enumerate(button_text):
    row, col = divmod(i, 10)
    btn = Button(frame)
    #sticky makes it stick to the sides
    btn.grid(row=row, column=col, sticky=N+S+E+W) 
    btn['text'] = char

#required to make buttons expand evenly
for x in range(10):
    Grid.columnconfigure(frame, x, weight=1)
    Grid.rowconfigure(frame, x, weight=1)

#Run the Show, this will run forever, until closed
root.mainloop()