Problem with updating .py files in Blender

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

have you saved the file after the change?

when developing dont use “from test import foo”

you need to import so you can do

import test
reload(test)

or if you want foo rather then test.foo just “import test” or import test; reload(test); foo = test.foo"

Yes, I saved .blend and .py files. Only a restart worked.
But this works now. Python’s reload() function reloads the current version of a .py file but you must restart the script twice.

Here an example:

import test
from test import foo

reload(test)

EDIT: Oopps I don’t see your post ideasman42