You either use the grid manager or a separate Frame for each set of 3 buttons.
from Tkinter import *
class GUI():
def __init__(self, r):
self.r = r
self.i = StringVar()
self.f = Frame(self.r)
self.f.pack(fill = BOTH)
self.g = LabelFrame(self.f, text = 'Groupbox 1', height = 90, width = 150, font = 'Lucida 8')
self.g.pack_propagate(0)
self.g.pack(side = LEFT, pady = 10, padx = 10)
self.id = Entry(self.g, justify = CENTER, textvariable = self.i, font = 'Lucida 8')
self.id.pack(pady = 22)
self.opt = LabelFrame(self.f, text = 'Groupbox 2', height = 90, width = 200, font = 'Lucida 8')
self.opt.pack_propagate(0)
self.opt.pack(side = TOP)
f1 = Frame(self.opt)
for ctr in range(3):
but = Button(f1, text = 'Button '+str(ctr+1), height=1, width=5, font='Lucida 8')
but.pack(side = LEFT, anchor = N, pady = 5, padx = 4)
f1.pack(side=TOP)
f2 = Frame(self.opt, height = 50, width = 200)
for ctr in range(3):
but = Button(f2, text = 'Button '+str(ctr+4), height=1, width=5, font='Lucida 8')
but.pack(side = LEFT, anchor = N, pady = 5, padx = 4)
f2.pack(side=BOTTOM)
t = Tk()
t.title('test')
#t.configure(bg = 'white')
t.geometry('400x120')
t.pack_propagate(0)
GUI(t)
t.mainloop()