You can try clearing sys.modules, as Ofer suggests here: http://groups.google.com/group/python_inside_maya/browse_thread/thread/183f144dbdd5abc6/7124448fdc1a214f
- Paul On Wed, Apr 22, 2009 at 7:40 PM, Sebastian Schoellhammer <[email protected]> wrote: > I bumped into this before as well - I do wish there would be a simple > #include next to standard importing in Python :( > > I have a question slightly connected to that: > I know usually you are not supposed to do something like > from module import * > but then sometimes its convenient isnt it :) > > The problem is that if I do that this way I can't reload the contents of the > module (as in reload(module)) until I restart Maya which is a pain during > development. > Did anybody find a workaround? > > Thank you! > seb > > > > On Thu, Apr 23, 2009 at 4:49 AM, Sylvain Berger <[email protected]> > wrote: >> >> Thanks for the suggestion... it was not the solution but lead me to it. >> I moved the imports directly inside the function that uses them. This way >> the import is only performed when the function is called instead of when the >> module is imported... it fixed my problem >> >> On Wed, Apr 22, 2009 at 3:13 PM, Chris G <[email protected]> wrote: >>> >>> You could try moving the "from mayaPy import one" to the bottom of >>> three.py. >>> >>> On Wed, Apr 22, 2009 at 3:07 PM, Sylvain Berger >>> <[email protected]> wrote: >>>> >>>> from mayaPy import one >>> >>> >> >> >> >> -- >> They say, "Evil prevails when good men fail to act." What they ought to >> say is, "Evil prevails." >> Nicolas Cage as Yuri Orlov in Lord of War. >> >> > > > > -- > Sebastian Schoellhammer > > Sr. Technical Artist > Square Enix LTD > www.square-enix.com > > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/python_inside_maya -~----------~----~----~----~------~----~------~--~---
