<br><div><span class="gmail_quote">On 3/5/07, <b class="gmail_sendername">Tony Cappellini</b> &lt;<a href="mailto:cappy2112@gmail.com">cappy2112@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Rename your file from .py to .pyw.<br>This will prevent the DOS window from appearing</blockquote><div><br>It&#39;s not the DOS window from the Python script I was talking about&nbsp; (in my mail I said &quot;my python<br>script is launched with pythonw&quot;) but the one resulting from the 
os.system or os.popen commands.<br><br>The two solutions that Alan gave are perfect for these :)&nbsp;  </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Message: 6<br>Date: Mon, 5 Mar 2007 16:51:42 +0100<br>From: learner404 &lt;<a href="mailto:learner404@gmail.com">learner404@gmail.com</a>&gt;<br>Subject: [Tutor] Hiding/Killing a DOS window (from a previous<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; os.system
 call)<br>To: &quot;Tutor Python&quot; &lt;<a href="mailto:tutor@python.org">tutor@python.org</a>&gt;<br>Message-ID:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<a href="mailto:13a83ca10703050751k17310476x506b163e66ea2e3c@mail.gmail.com">13a83ca10703050751k17310476x506b163e66ea2e3c@mail.gmail.com
</a>&gt;<br>Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br><br>Hello,<br><br>I&#39;m launching an external app through an os.system() or os.popen() but I<br>don&#39;t want the resulting DOS window to hang-on there forever (my python
<br>script is launched with pythonw):<br>I use a sys.exit() to kill the script who launched the external<br>app.Thepython script is killed, the app is launched, but the resulting<br>DOS window<br>is still there (I have the same result if I use the DOS tskill or taskkill
<br>command to kill the script with his PID).<br><br>How could I hide/kill the resulting DOS window&nbsp;&nbsp;from an os.sytem /<br>os.popenwith Python ?<br><br>Also is there a way to launch an external app. but without os.system and
<br>os.popen to wait there but immediately continue to the next python line (to<br>avoid this I&#39;m using a thread for now).<br><br>As an example I&#39;m using this so far.<br>If I use pythonw to launch the script, notepad is launched, the script is
<br>killed but the DOS window stay there.<br></blockquote></div><br>