I am new in Python classes and trying to write an interface for a scientific code via Tkinter. But I can not call a function (which is in another class and opens a different frame) from a class or function. I have been searching for more than 2 days but could not find an answer to my case. If you explain like explaining a child I would be very happy since I don't know much technical details.
My code structure is like:
class first_class(tk.Tk):
def __init__(self, *args, **kwargs):
tk.Tk.__init__(self, *args, **kwargs)
....
def WhateverFunction():
"do sth"
class second_class(tk.Tk):
def __init__(self, parent, controller):
tk.Frame.__init__(self, parent)
.....
**I want to use "WhateverFunction" here**
.....
so basically, I can not access that function from another class.
The searches I found online like Python using methods from other classes method. Bu This did not solve my problem. It is maybe because I am working with different Tkinter frames. I do not now... Thanks already, cheers!