I am trying to use an object's method as a timer callback:
Code: Select all
#creating a new object a
>>> a = test()
>>> a.mymethod
<bound_method>
>>> timer = Timer(0)
>>> timer.init(period=50, mode=1, callback=a.mymethod)
Code: Select all
TypeError: function takes 1 positional arguments but 2 were given