def __init__(self, *args, **kwargs):
    tk.Frame.__init__(self, *args, **kwargs)
b = tk.Button(self, text='Open new window', command=self.new_window)
Python 3 and tkinter opening new window by clicking the button