I basically want to call a function located inside a class from a function which is outside of any class, like the following example code:
class something(Gridlayout):
def func1(self, number1, number2)
Solution = number1 + number2
def call_func1()
Something.func1(3, 5)
Of course this is only an example this isn't what I want to do, but the point is i tried the code above and it gives the following error:
TypeError: unbound method func1() must be called with something instance as first argument (got int instance instead)
What am I doing wrong??
func1is an instance method. So you first need to construct aSomethinginstance, and then callfunc1on that instance.