It would make sense if core.py looked like:
Code:
class core:
def printHello(self):
print "Hello Moto"
and the script with AddOn (addon.py) looked like:
Code:
class AddOn:
def __init__(self, core):
self.core = core
def saySomething(self):
self.core.printHello()
All you have to do is:
Code:
from core import core
from addon import AddOn
# Instantiate AddOn, passing to it an instance of core.
addon_instance = AddOn(core())
# Call saySomething.
addon_instance.saySomething()
That should say "Hello Moto".