On Jan 9, 2008 9:42 AM, Lee Culver <[EMAIL PROTECTED]> wrote:
>
>> class MyClass(SomeNameSpace.IMyInterface):
>>     def SomeFunc(self):
>>         from mymod import myfunc
>>         myfunc()
>>
>> That way, the import gets re-run each time you run SomeFunc, and
>> you'll always get the latest version of the module.
>
> This will not re-import mymod every time the function is run.  Once you
> run "from foo import bar" or "import foo" then the "foo" module is loaded
> into python and will not be reloaded from python without an explicit call
> to the reload function.

Poor wording on my part, sorry. What I should have said was that the
"myfunc" symbol will be reimported from the "mymod" module at that
point in time, and will therefore pick up any changes to "mymod" that
have been made -- including changes made by a reload.  I did not mean
to imply that "mymod" itself would be reloaded.

--
Curt Hagenlocher
[EMAIL PROTECTED]
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to