Multiple internal python files not updating ?

Hi,

When I create 2 python scripts (let’s say Main.py & Util.py), the first time the first one import the second everything work perfectly but any subsequent changes in the imported one are not taken into account when launching the first one.
(But directly launching the second one with ‘Run script’ does work)

Reload won’t work because both files are packed internally. Didn’t check ‘Register’ or anything.

What am I missing ?
Thank you by advance.

Blender 2.69 on Win7 64

That is just the way it works. When developing a script I am constantly opening Blender, testing code, closing Blender and trying it again. By leaving Register on for each script the close, open sequence should reload the new code. Or make them external files while you are developing and debugging, this way reload will work. Once your script is final pack them with Register turned on.


modules_to_import = ("properties", "ui", "operators", "events")
if "bpy" in locals():
    import imp
    for mod in modules_to_import:
        exec("imp.reload(%s)" % mod)
else:
    for mod in modules_to_import:
        exec("from . import %s" % mod)


import bpy