[QGIS-Developer] Reload python library used by plugin

Benjamin Jakimow benjamin.jakimow at geo.hu-berlin.de
Wed May 22 09:22:32 PDT 2024


Hi Gerald,

you may use "from importlib import reload" to reload the packages that 
have been changed.

https://docs.python.org/3/library/importlib.html#importlib.reload

Greetings,
Benjamin

On 16.05.2024 13:13, Gerald Kogler via QGIS-Developer wrote:
> The fantastic Plugin Reloader doesn't reload loaded libraries as 
> documented here 
> (https://github.com/borysiasty/plugin_reloader/issues/37). So when I 
> change code in a library used by a QGIS plugin the only way I know to 
> reload this library is to restart QGIS.
> 
> To make it clear: I'm not talking about core libraries but python 
> libraries shipped with plugins (like Mergin/pygeodiff or GeoCat Bridge/ 
> bridge-style)
> 
> Is there a more dynamic way to force a python library to reload?
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

-- 
Dr. Benjamin Jakimow
Earth Observation Lab | Geography Department | Humboldt-Universität zu 
Berlin

e-mail: benjamin.jakimow at geo.hu-berlin.de
web:    https://hu-berlin.de/eo-lab
phone:  +49 (0) 30 2093 6846
mobile: +49 (0) 157 5656 8477
fax:    +49 (0) 30 2093 6848
mail:   Unter den Linden 6 | 10099 Berlin | Germany
linkedin: https://www.linkedin.com/in/benjamin-jakimow
matrix: @jakimowb:hu-berlin.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4745 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20240522/5b8aff6d/attachment.bin>


More information about the QGIS-Developer mailing list