Tkinter with .p3d, error on opening

I was able to create the same user interface without Tkinter using the DirectGUI. It works as a stand-alone program and accepts and outputs all the right values. But I’m having a similar problem as here: Destroying and re-creating ShowBase

My code looks like this:

class input_variables(ShowBase):
    def __init__(self):
        ShowBase.__init__(self)

//three buttons and two number entry fields.       

      exit_button = DirectButton(text = "Make it so!",
                                   command = self.exit_button,
                                   scale = 0.1,
                                   pos = (0, 0, -0.75),
                                   pressEffect = 1)
        def exit_button(self):
        base.destroy()

//run
del input_variables

//more code
class main(ShowBase):
// etc
// run main

I get a blank p3d screen that doesn’t run my main(). No errors though.

Thanks again.