run this file (test.py) as:<br><br>def finish():<br>    print &#39;\n&#39;, &quot;bye&quot;, &#39;\n&#39;<br>    raw_input(&#39;Press Enter to quit: &#39;)<br><br>finish()<br><br>$python -i test.py<br><br>A second approach could be:<br>

<br>def finish():<br>    import os, subprocess<br>    print &#39;\n&#39;, &quot;bye&quot;, &#39;\n&#39;<br>    raw_input(&#39;Press Enter to quit: &#39;)<br>    subprocess.call(&#39;python&#39;)<br><br>finish()<br><br>$python test.py<br>

<br>bye <br><br>Press Enter to quit: <br>Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51) <br>[GCC 4.2.1 (Apple Inc. build 5646)] on darwin<br>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.<br>

&gt;&gt;&gt; <br><br>A word of caution, am not using IDLE and preferably you should avoid it too.<br><br>~l0nwlf<br><br><br><div class="gmail_quote">On Wed, Mar 24, 2010 at 2:46 AM, bob gailer <span dir="ltr">&lt;<a href="mailto:bgailer@gmail.com">bgailer@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On 3/23/2010 4:47 PM, Wayne Watson wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I use this code to quit a completed program. If no is selected for the yes/no prompt, warning messages appear in the shell window.<br>
</blockquote>
<br></div>
What is the yes/no prompt? Is it in your program or is it a feature of IDLE?<br>
<br>
What are the warning messages?<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I&#39;m executing from IDLE. Is there a way to just return to the &gt;&gt;&gt; prompt there?<br>
<br>
def finish():<br>
    print; print &quot;Bye&quot;<br>
    print<br>
    raw_input(&#39;Press Enter to quit&#39;)<br>
    sys.exit()<br>
<br>
</blockquote>
<br>
<br>
-- <br></div><font color="#888888">
Bob Gailer<br>
919-636-4239<br>
Chapel Hill NC</font><div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
Tutor maillist  -  <a href="mailto:Tutor@python.org" target="_blank">Tutor@python.org</a><br>
To unsubscribe or change subscription options:<br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
</div></div></blockquote></div><br>