@damon: reload only works on modules, right? Usually when I run reload(), it takes care of loading from the py and not a pyc (you can usually confirm this by running reload manually and seeing the path it prints out).
If your top level module imports other modules, whose source you are changing, you would need to "deep reload" all of those. That means all of the dependencies that changed have to be reloaded first, then the modules depend on them have to be reloaded. We have had some topic on reloading in the past, I think, with some extended info on this. Code within 'if __name__ == "__main__"' shouldn't get executed under Maya. Is the particular project, for which you are having trouble, a single module or a multi-module project? The MayaSublime plugin should allow you to send the entire file for execution to Maya, in its own namespace. Have you tried that out? It doesn't use the import mechanism, but rather does an execfile on the source. On Sat Feb 21 2015 at 5:34:18 AM Marcus Ottosson <[email protected]> wrote: > If you print your module, you’ll see where it exists on disk, the .pyc > file might lie right next to it. It’s also possible that you’ve got two > modules with the same name in your PYTHONPATH, which would explain why you > can import it, but not see the changes you make to the other one. > > > -- > 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/CAFRtmOC0jpt2BypPrg3XjHUpcS%3DEExZPng7jT4Aj%2B_210KnWXg%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOC0jpt2BypPrg3XjHUpcS%3DEExZPng7jT4Aj%2B_210KnWXg%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/CAPGFgA14%3DTZY4hB0F0i1RT9%2B66oagFVd95Q9z5PN_s-UGNE9fg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
