Ya since modules are only loaded once, if you reload the sub module then on
next run of the main module, it will reflect that.
On Feb 21, 2013 7:06 PM, "Panupat Chongstitwattana" <[email protected]>
wrote:

> Thanks Justin.
>
> So you mean we can specifically reload it ourselves and it will affect the
> parent module? For example if I have
>
> myScript.py
>
> which imports myFunctions
>
> I can do
> reload(myFunctions)
>
> And that will update the result I have when I run myScript?
>
> Panupat.
>
> On Thu, Feb 21, 2013 at 1:01 PM, Justin Israel <[email protected]>wrote:
>
>> You have to do the legwork yourself to achieve that. I did something like
>> a global "reload" command that would look at sys.modules, and selectively
>> reload the ones from our production repo.
>> But recursively knowing what modules are loaded by a top level module
>> requires some inspection. I think you can search and fine some project out
>> there that do advanced reloading. You also can't reload any modules that
>> are not pure-python.
>>
>> On Thu, Feb 21, 2013 at 6:46 PM, Panupat Chongstitwattana <
>> [email protected]> wrote:
>>
>>> When I reload a python script, is there a way to force it to reload
>>> imported modules within the script, too?
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Python Programming for Autodesk Maya" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected]
>>> .
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to