Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.04; 'executing': 0.05; 'pm,': 0.11; '>>>': 0.12; 'wrote:': 0.14; 'basic.': 0.16; 'copied.': 0.16; 'pause': 0.16; 'qt,': 0.16; 'subject:Programming': 0.16; 'subject:Thread': 0.16; 'you..': 0.16; 'subsequent': 0.16; 'idle': 0.19; 'appear': 0.19; 'command': 0.19; 'wondering': 0.19; '(which': 0.21; 'code': 0.22; 'header:In- Reply-To:1': 0.22; 'thu,': 0.22; 'received:209.85.214.174': 0.23; 'received:mail-iw0-f174.google.com': 0.23; 'world!': 0.23; 'worked': 0.24; "i'm": 0.26; 'chris': 0.27; 'tried': 0.27; 'message-id:@mail.gmail.com': 0.28; 'does': 0.31; 'separate': 0.31; 'import': 0.32; 'to:addr:python-list': 0.32; 'execution': 0.33; 'using': 0.34; 'file': 0.35; 'open': 0.35; 'hello,': 0.36; 'missing': 0.36; 'skip:o 20': 0.37; 'background': 0.37; 'received:209.85': 0.37; 'received:google.com': 0.38; 'but': 0.38; 'received:209.85.214': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.39; 'header:Received:5': 0.40; '2011': 0.62; 'share': 0.67; 'batch': 0.69; 'meanwhile,': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=lb2SS0kb87X+lJKeCArbPhbX4iV3ONGLvWlgY57JO9s=; b=wu/pJNZqc4Wb0GwxOpGjjVlBNykBmBFRIlOud6Jz/zC6EDnu6PRoTf2I3Ba+LrVnaT RAnM7mnprklQLlO+h293Y2v96mzalkMxdHjTylWWzyKPo9mDcRza5/XrThUUS18eobBE Vg/gL5/6jYDq5arN8zDcmptvNPnsWs/IuOfQg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=waLkKu/XfctgA5J5vF0C4ZaPdfPZV0nuskJhgEO6vSyxprmapFlhNWZXbl2Uaoj9Ow /7IJ3A6YCMBJmgZQZGAvOfYkI8l+06tUz1s8nFQffF9eeZ6jV8CvsZN4+aNX3WUHt6MZ RwHadacESSZOgHFCxJRyun1CYYDjKaKTlTYVw= MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 12 May 2011 20:46:15 +1000 Subject: Re: NewBie Doubt in Python Thread Programming From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 31 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1305197178 news.xs4all.nl 81485 [::ffff:82.94.164.166]:34922 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:5226 On Thu, May 12, 2011 at 7:42 PM, vijay swaminathan wrote: > Hi Chris, > > I tried using os.system as well but it did not even open up the command > prompt. > > Can you please share the code that worked for you.. just wondering if I'm > missing something very basic. Caveat: I'm not using Qt, I just tried this in IDLE (which is graphical). C:\>copy con test.bat echo Hello, world! pause ^Z 1 file(s) copied. IDLE 2.6.5 >>> import os >>> os.system("c:\\test.bat") 0 The 0 and subsequent prompt don't appear until the batch file finishes. Meanwhile, the batch file is executing in a separate window. When you try it inside Qt, do you get a background window that needs to be brought to the front? Does execution pause while the batch file runs? Chris Angelico