Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.031 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'subject:Python': 0.04; '(python': 0.05; 'pm,': 0.11; 'wrote:': 0.14; 'shell=true)': 0.16; 'subject:Programming': 0.16; 'subject:Thread': 0.16; 'command': 0.19; 'header:In-Reply-To:1': 0.22; 'thu,': 0.22; 'windows': 0.26; 'chris': 0.27; 'tried': 0.27; 'work.': 0.27; 'message- id:@mail.gmail.com': 0.28; 'testing': 0.28; 'closing': 0.29; 'problem': 0.29; 'sends': 0.29; 'invoke': 0.31; 'to:addr:python- list': 0.32; 'done': 0.32; 'using': 0.34; 'change': 0.34; 'problem,': 0.35; 'that,': 0.35; 'quite': 0.36; 'should': 0.37; 'received:209.85': 0.37; 'run': 0.37; 'received:google.com': 0.38; 'but': 0.38; 'skip:" 20': 0.38; 'earlier': 0.39; 'signal': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.39; 'finished': 0.40; 'header:Received:5': 0.40; '2011': 0.62; 'received:209.85.210.174': 0.84; 'received:mail- iy0-f174.google.com': 0.84; 'well..': 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:content-transfer-encoding; bh=vr5v6lG2SRCpK16os9osWDh4PZnqxPzJiYrNXXBClN4=; b=oG0pRqcO4xzrBgNTuhDsGZTRU+sHmtchfk5NofYvcBzzpg4EoyVwnwO0oWqoeLicl/ bCz06v/G4BlEyV1ScGEQq5qssyPD7tK414VBW3UrA3vibPR5KqpQVce4cBBd2H/4vjUc 2k3h8yLgqZkMeuHc55GC6Rx3bP6090fwbJkL4= 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:content-transfer-encoding; b=xbPitmVdjjHRntGbEqG3AqZfvFJRZOFs2Cz3kzvI32F/1ixUj6bqt+ilvVeS+CEa1E +5nL05Ag+qyLneUiceefWkxrEM5eFyblhWlo+8BZr1j8rrmi0fgcsRiPpqwOQWr9x/FO oj6fZl6utdejYhw1j6XnNw/E/mwhQgM2EBe/E= MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 12 May 2011 18:08:05 +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 Content-Transfer-Encoding: quoted-printable 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: 17 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1305187694 news.xs4all.nl 32470 [::ffff:82.94.164.166]:42878 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:5220 On Thu, May 12, 2011 at 3:35 PM, vijay swaminathan wro= te: > I tried using QThread as well.. But the problem is, on the run method whe= n i > invoke the command prompt, it sends out the finished signal...=A0 I want = it to > send out the finished signal only on closing the command prompt that is > invoked earlier in my process. > =A0=A0=A0=A0=A0=A0=A0 subprocess.call(["start", "/DC:\\PerfLocal_PAL", > "scripts_to_execute.bat"], shell=3DTrue) This is your problem, still. You need to change to a call that waits. In my testing on Windows (Python 2.6.5), this can be done with os.system() quite happily. Change that, and it should all work. Chris Angelico