I want to run function in other class, after click on button in main window. How should I pass the value[id_entry] from data input in Class[StartingPage] to function[read_data] in second class[Graph]. I want pass value and run function after click on "Analyse expense" button. Is it possible?
class MainWindow(tk.Tk):
def __init__(self, *args, **kwargs):
    tk.Tk.__init__(self, *args, **kwargs)
    tk.Tk.iconbitmap(self)
    tk.Tk.wm_title(self, 'Data analyser')
    window = tk.Frame(self)
    window.pack(side='top', fill='both', expand = True)
    window.grid_rowconfigure(0, weight=1)
    window.grid_columnconfigure(0, weight=1)
    self.frames = {}
    for F in (StartingPage, Graph):
        frame = F(window, self)
        self.frames[F] = frame
        frame.grid(row = 0, column = 0, sticky = 'nsew')
    self.show_gui(StartingPage)
def show_gui(self, window):
    frame = self.frames[window]
    frame.tkraise()
class StartingPage(tk.Frame):
def __init__(self, parent, window):
    tk.Frame.__init__(self, parent)
    label = tk.Label(self, text = 'Upload document')
    label.pack(pady = 10, padx = 10)
    button1 = ttk.Button(self, text = 'Upload XLS file',
                           command=lambda: self.open_file())
    button1.pack()
    button2 = ttk.Button(self, text = 'Analyse expense',
                           command=lambda: window.show_gui(Graph))
    button2.pack()
    id_entry = ttk.Entry(self)
    id_entry.pack()
def get_string(self):
    return self.id_entry.get()
def open_file(self):
    file = askopenfile(mode='r', filetypes=[('excel files', '*.xlsx')])
    export_do_SQL.export_to_sql(file.name)
class Graph(tk.Frame):
def __init__(self, parent, window):
    tk.Frame.__init__(self, parent)
    label = tk.Label(self, text = 'Expense analyser')
    label.pack(pady = 10, padx = 10)
    button1 = ttk.Button(self, text = 'Return',
                           command=lambda: window.show_gui(StartingPage))
    button1.pack()
    id_element = read_data(DATA FROM INPUT)