i would like import a file in a blender plugin, which is in the same directory
so i 've written the import, but when i use a class of the file imported, i have this mistake:
NameError: name 'Md3Frame' is not defined
How to resolve this problem?
add the path to this module to the python path variable
| Code: |
import sys
sys.path.append("c:/blah/blah/blah/")
|
Martin
_________________
Life is what happens to you when you're busy making other plans.
- John Lennon
it doesn't work
Here is an example of what i would like doing
my file "module.py"
class Class:
def __init__ (self):
pass
my file "main.py"
import module
import sys
sys.path.append("/home/info/An-01-02/levimond/blender/plugins")
myClass = Class ()
i want execute "main.py" in Blender but i get this mistake:
Traceback (most recent call last):
File "main.py.001", line 6, in ?
NameError: name 'Class' is not defined
So, how can i resolve this problem ?