Larry, Fantastic! Just what I was looking for but didn't know where to start looking.
And here's the page in the documentation: http://www.qgis.org/en/docs/user_manual/introduction/qgis_configuration.html It's OK that it is per project as this need has arisen for just one user at the moment. Thanks Ross On 04/02/14 18:36, Larry Shaffer wrote: > Hi Ross, > > On Tue, Feb 4, 2014 at 9:32 AM, Etienne Tourigny > <etourigny....@gmail.com <mailto:etourigny....@gmail.com>> wrote: > > You could place your code in your plugin's unload() method. But I'm > not sure this would work, because some things might not be available > at that time (e.g. layers, etc.). > > See this page for a simple example > http://www.qgis.org/en/docs/pyqgis_developer_cookbook/plugins.html > > > On Tue, Feb 4, 2014 at 7:41 AM, McDonaldR <mcdona...@angus.gov.uk > <mailto:mcdona...@angus.gov.uk>> wrote: > > Hi List____ > > __ __ > > Is it possible for QGIS to run a (python) script on shutdown? > There is a feature on the QGIS issues list about startup scripts > (http://hub.qgis.org/issues/6297) – can shutdown scripts be used > in the same way?____ > > > Have your tried putting that Python code in the closeProject() Python > Project Macro (in Project Properties dialog in QGIS 2.0+)? Not global to > the app, but it is already implemented, just at the per-project level. > > Regards, > > Larry > > > Say, for example, I have a project in which I am editing a > dataset in a spatialite database. At the end of the edit session > I save my work and shutdown QGIS. Before shutdown actually > happens a python script/batch file runs which zips the > spatialite database and copies it to a remote server location > ready for processing by some other software.____ > > __ __ > > Thanks____ > > __ __ > > Ross____ > > __ __ > > *Ross McDonald *|**GIS Data Coordinator | Resources Department, > IT Division | Angus Council, Angus House, Orchardbank Business > Park, Forfar, DD8 1AT____ > > T: *01307 476419* | F: 01307 476401 | E: mcdona...@angus.gov.uk > <mailto:mcdona...@angus.gov.uk> | W: *Angus Maps > <http://www.angus.gov.uk/maps/map_home.cfm>*____ > > __ __ > > > > This message is strictly confidential. If you have received this > in error, please inform the sender and remove it from your > system. If received in error you may not copy, print, forward or > use it or any attachment in any way. This message is not capable > of creating a legal contract or a binding representation and > does not represent the views of Angus Council. Emails may be > monitored for security and network management reasons. Messages > containing inappropriate content may be intercepted. Angus > Council does not accept any liability for any harm that may be > caused to the recipient system or data on it by this message or > any attachment. > > > _______________________________________________ > Qgis-user mailing list > Qgis-user@lists.osgeo.org <mailto:Qgis-user@lists.osgeo.org> > http://lists.osgeo.org/mailman/listinfo/qgis-user > > > > _______________________________________________ > Qgis-user mailing list > Qgis-user@lists.osgeo.org <mailto:Qgis-user@lists.osgeo.org> > http://lists.osgeo.org/mailman/listinfo/qgis-user > > > > > _______________________________________________ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/qgis-user > _______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user