Thanks Damon and Marcus!
Well, i tried doing reload of a the class inside the file, and it didn't
work...

I'll see if it works once again.

The PYTHONDONTWRITEBYTECODE  stuff , i'll see how that works.

Thanks!

--
Lidia

2015-02-20 16:08 GMT+01:00 damon shelton <[email protected]>:

> You need to reload(className)
> Even though you reloaded moduleName
> ClassName is not getting reloaded in globals.
>
> Reload won't work with import * unless you write code to remove all the
> objects from globals that import * creates first
> On Feb 20, 2015 6:35 AM, "Lidia Martinez" <[email protected]> wrote:
>
>>
>> While developing i need to be compiling code all the time.
>>
>> I've reached a point where i realised my files where not reloading, no
>> matter what i told them.
>>
>> I have my code inside a button, after watching Sublime Text failing when
>> executing reload code inside:
>> if __name__== "__main__" :
>> ...
>>
>> I moved all the code to my shelf button, i tried importing and reloading
>> at the same time, just to make it all reload and execute the new file. But
>> it doesn't print what i tell him. This is not reloading...
>>
>> The module contains some imports on the top and a class.
>>
>> // button code
>>
>> import moduleName
>>
>> reload (moduleName)
>>
>> from moduleName import className # doing * didn't work!
>>
>> reload(moduleName) # ??... just trying crazy things
>>
>>
>> ....
>>
>> Yhy? Something i'm missing about python or compiler cache stuff in Maya?
>>
>>
>>
>>
>> --
>> Lidia
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/CAAB1%3D8wWQztaW0PwvXfAvrkEg7fyCdHq81-tuiwjH7_eZW4H%2Bg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/python_inside_maya/CAAB1%3D8wWQztaW0PwvXfAvrkEg7fyCdHq81-tuiwjH7_eZW4H%2Bg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>  --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAM9RXoKJxNorAqROtFwY-G4btreFEjOoNxjNzN2GXZ32C7GWVw%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAM9RXoKJxNorAqROtFwY-G4btreFEjOoNxjNzN2GXZ32C7GWVw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAAB1%3D8wDPicU9F37F%3D68w2tdAUfMM-di34pxANgeVPEv9VzsGQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to