I am developing a plugin and trying to develop it in a modular way...... so I have a top level python plugin file e.g MyPlugin.py in my Packages/MyPlugin/ folder. MyPlugin.py imports python modules from a sub folder e.g. Packages/MyPlugin/mypymodule

After editing and saving MyPlugin.py the plugin is reloaded and I am able to test it straight away in Sublime Text 2.My python modules are imported correctly and all works fine at first glance.

However, after editing and saving one of my module.py files located in the Packages/MyPlugin/mypymodule, the changes are not picked up in the same way as a change to MyPlugin.py. Even if I then make some change to MyPlugin.py and save it - the changes made to the modules are still not picked up, even though Sublime Text does reload MyPlugin.py.

So far the only workaround I have is to close Sublime Text and re-open it, which will soon become a complete PITA.

I had a quick search but didn't find anything useful on the subject, but I feel I can't be the only person to have run into this problem. If anybody has a tip or better workaround, I'd be Grateful to know about it.

@Nick,Yes I tried deleting the *.pyc files, and interestingly they did not seem to get recreated. I then opened a terminal in the module folder and explicitly ran 'python myPluginModule.py' which did recreate the .pyc , but Sublime Text did not seem to be using this new version.

I suspect once the modules are loaded into ST2's embedded python interpreter they are just sitting in RAM.

If you look at SVN.py in the SVN package, or SFTP.py in the SFTP package, I use reloading so that I can actively develop in Sublime without having to constantly restart. Depending on the complexity of your dependencies, you may have to do a little work to make sure they are all reloaded in the right order.