Use defmain
Hy on QGIS