All the objects in Python are passed by reference, so no special syntax is required. Your code should work. In fact, there is NO way to pass it not by reference.
UPD: As your question has been changed, it becomes clear that your program fails not because of passing self
in a wrong way. It is a problem with the library you are using. Try to perform correct initialization for your base class, call super(myLeapMotion, self).__init__()
before adding a listener. At least here it is done this way.
UPD2: Looks like I am right. Here the code author does almost exactly the same as you do. The only difference is that he calls __init__
from the base class.