Posted: Mon Feb 10, 2003 10:41 am
Joined: 22 Dec 2002
Posts: 5
Hi I'm new in python scripting. And I have a little problem. I have two script files loaded in text window - for example file1.py and file2.py. And if I write in file1.py this:
from file2 import *
I got an error - Module 'file2' not found
What should I do? Or what should I set and where?
Thanx for help
Posted: Fri Feb 14, 2003 11:05 am
Joined: 22 Dec 2002
Posts: 5

hey, is anyone reading this formum? Did somebody already read my message? Does somebody care about my problem?
Posted: Fri Feb 14, 2003 5:11 pm
Joined: 16 Oct 2002
Posts: 46
I don't know much about python, and maybe the ones that know in this forum don't know how to help you. Ask for help in
www.elysiun.com
EDITED: I think you are trying to import a file in the wrong way. In a python script I saw this:
import Blender
from Blender.Draw import *
So I guess python thinks you are trying to import a function not a file. Try the first, but as you can see, I'm just guessing.
Posted: Sun Feb 23, 2003 9:30 am
Joined: 22 Dec 2002
Posts: 5
Thax for help, but that's not it. Maybe I try ellysium.
Posted: Sun Feb 23, 2003 9:50 pm
Joined: 13 Jan 2003
Posts: 20
| xvoodoo wrote: |
Hi I'm new in python scripting. And I have a little problem. I have two script files loaded in text window - for example file1.py and file2.py. And if I write in file1.py this:
from file2 import *
I got an error - Module 'file2' not found
What should I do? Or what should I set and where?
Thanx for help |
Hi
As far as I know, loading both scripts is not the right way. If you want to import file2 in file1, file2 must be in the PYTHONPATH: like other python modules, it must be in one of the folders where the python interpreter will look for it. This link at elysiun should tell you how to solve the matter:
http://www.elysiun.com/forum/viewtopic.php?t=7723
Have fun.