Hey,
I have question, I'm trying to pass the module itself when calling a function in another module. Let me illustrate:
test.py
import test2
def hello():
print "hello there"
test2.call(self)
test2.py
def call(object):
object.hello()
>python test.py
Traceback (most recent call last):
File "test.py", line 6, in <module>
test2.call(self)
NameError: name 'self' is not defined
when I google, I see that self is mostly refered to classes. Is this only for classes or did I miss a link?
Thx in advance