<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
span.StileMessaggioDiPostaElettronica17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="IT" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi all,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">   I would like to run a python script via
</span><code><span lang="EN-US" style="font-size:10.0pt">qgis --code myscript.py</span></code><span lang="EN-US"> and then immediately exit. I'm using
</span><code><span lang="EN-US" style="font-size:10.0pt">iface.actionExit().trigger()</span></code><span lang="EN-US">, which kills QGIS when I run it from the python console, but not when put in the script that I pass to
</span><code><span lang="EN-US" style="font-size:10.0pt">–code.<o:p></o:p></span></code></p>
<p class="MsoNormal"><span lang="EN-US">What's the right way to immediately exit? I'm running QGIS 2.14 on win 7.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Roberto Poltini<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div style="font-size:9pt;  font-family: 'Calibri',sans-serif;"><font color="gray">
<div class="MsoNormal" align="center" style="text-align:center"><span style="color:gray">
<hr size="1" width="100%" align="center">
</span></div>
Per essere informati sulle novità del Gruppo Iren, vi invitiamo a registrarvi alla nostra mailing list, all’indirizzo
<a href="http://www.gruppoiren.it/">"http://www.gruppoiren.it/"</a> . <br>
<br>
È possibile, inoltre, avanzare nuove idee e progetti per il territorio e seguire quelli già attivi nei Comitati Territoriali del Gruppo Iren, consultando
<a href="http://www.Irencollabora.it">"http://www.Irencollabora.it"</a> <br>
<br>
You can also suggest new ideas and initiatives for the territory and view those already active in the Iren Group Territorial Committees
<a href="http://www.Irencollabora.it">"http://www.Irencollabora.it"</a> <br>
<br>
Le informazioni contenute nella presente comunicazione e i relativi allegati possono essere riservate e sono, comunque, destinate esclusivamente alle persone o alla Società sopraindicati. La diffusione, distribuzione e/o copiatura del documento trasmesso da
 parte di qualsiasi soggetto diverso dal destinatario è proibita, sia ai sensi dell’art. 616 c.p. , che ai sensi del D.Lgs. n. 196/2003. Se avete ricevuto questo messaggio per errore, vi preghiamo di distruggerlo e di informare immediatamente il mittente.<br>
<br>
<br>
</div>
</font>
</body>
</html>