Pass a variable to a function via TK button

  button, python, tkinter

I have defined the following functions in a module called

def load_file():
    file_name = filedialog.askopenfile(filetypes=['EXE files', '*.exe'])
    return file_name   

def simulation(input_path, input_par): # this works fine
    # the functionruns an EXE file ang gives me two lists lst1 and lst2
    return lst1, lst2 

Now the following button defined in the calls the load_file function and it works fine (I print the path from within the function in the terminal). What I cannot igure out is how to pass the path I get within the load_file function as arrgument input_path to the function simulation via the button within the Pleas guys help me out here…I am stuck

button = Button(frame_file, text='Open file', command=load_file)
button.grid(row=1, column=1)

Source: Python Questions