[Qgis-developer] Unloading and reloading of plugins

Richard Duivenvoorde rdmailings at duif.net
Fri Jan 8 09:00:49 EST 2010


Martin Dobias wrote:
> today I've added support for complete unloading and reloading of
> python plugins (r12690). So from now developers creating python
> plugins won't have to restart every time they do some changes.
> Instead, in qgis python console they can type:
> qgis.utils.reloadPlugin('myplugin')
> 
> ... and the plugin gets removed completely and started again (using
> fresh source files).

He Martin,

great!! Confirmed working here on ubuntu 9.4

I think this will give me at least one day more to 'live' this year ;-)

> It would be good to have this functionality available somewhere in the
> GUI. Any hints where it should go? Or there could be a simple plugin
> for developers that would trigger the reload... It would be even
> possible to monitor changes in plugins source code periodically and
> ask user to reload the modified plugins if any changes are detected,
> check this site for insipiration:
> http://www.indelible.org/ink/python-reloading/

for me, the python-console-option is actually enough, I'm developing one
plugin at a time anyway, and am already very, very happy with this option.

But he, if you're in the mood don't let me stop you ...

Like Borys I would say: keep the gui simple. And maybe do not put it in
the normal menu's. It's only for developers isn't it? Then put it in the
python console? Most 'Normal users' would not be interested in this
feature I think.

My idea for the gui:
In the console: one button "reload plugin(s)" and a dropdown with all
plugins loaded and one item 'All'.

And again: THANKS Martin for this work!

Regards,
Richard Duivenvoorde


More information about the Qgis-developer mailing list