Problem with updating .py files in Blender

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
KoRn
Posts: 0
Joined: Thu May 17, 2007 12:15 pm

Problem with updating .py files in Blender

Post by KoRn » Thu May 17, 2007 12:17 pm

Hallo.

I have a problem with updatin .py files in Blender's text editor.
If I load some .py files in Blender and stat this script via main.py it works great.
But if I change one of these files except the main.py this change does not work in main.py.

Here is an example:

main.py
--------------
from test import foo

print foo()

test.py
--------------
def foo():
return 1.5

This works great. 1.5 is printed

But if I change 1.5 to 1.0 and call foo() again from main.py still 1.5 is printed.

Can anybody help me with this problem. I don't know what to do about tihs.
I'm using Blender 2.44 and Python 2.5

Bye,
KoRn

reD_Fox
Posts: 0
Joined: Sat Mar 12, 2005 2:56 pm
Location: Abilene, KS

Post by reD_Fox » Thu May 17, 2007 2:18 pm

Hello,

This might be of some use to you:
http://docs.python.org/lib/built-in-funcs.html#l2h-61

Levi
A three-legged stool never wobbles.

KoRn
Posts: 0
Joined: Thu May 17, 2007 12:15 pm

Post by KoRn » Thu May 17, 2007 2:48 pm

reD_Fox wrote:Hello,

This might be of some use to you:
http://docs.python.org/lib/built-in-funcs.html#l2h-61

Levi
Thanks.
This works great.
But I have to start the script twice before I can see some change.
Is this a normal thing???

Post Reply