2012-05-30, 17:56
Hello folks,
I have written a special class file (e.g. called myOwnClasses.py) which should reside in the "resources/lib/" path of my addon. This file contains two classes (called class1 and class2) which I want import in my mainfile (default.py) in the root-directory of the addon.
I've tried:
but this fails. If I place myOwnClass.py in the same directory like default.py everything works, but I don't want that. How do I build the path to myOwnClass within Python?
_BJ1
I have written a special class file (e.g. called myOwnClasses.py) which should reside in the "resources/lib/" path of my addon. This file contains two classes (called class1 and class2) which I want import in my mainfile (default.py) in the root-directory of the addon.
I've tried:
Code:
import resources.lib.myOwnClasses as myOwnClass
from myOwnClass import class1, class2
but this fails. If I place myOwnClass.py in the same directory like default.py everything works, but I don't want that. How do I build the path to myOwnClass within Python?
_BJ1