Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #5220

Re: NewBie Doubt in Python Thread Programming

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 <rosuav@gmail.com>
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 <BANLkTinBTiQhccb+JrKtCLmCZZs7OeTKJw@mail.gmail.com>
References <BANLkTikr8fu1sDrfu2a-wyEN_KpVVNCdew@mail.gmail.com> <BANLkTik_ZLvgUVuttiGKQshLmnkU_Mvk+g@mail.gmail.com> <BANLkTin7fq7ybKq94ZUs-7X8dLu7_UFnrQ@mail.gmail.com> <BANLkTi=1ovD0w690xY3cyRwx5C4oPpQY5Q@mail.gmail.com> <BANLkTim-4eHSJe8jc9QcDo-ZfzOHxFg=5w@mail.gmail.com> <BANLkTimPEB8GCAOHQY4-V53eTHr6Rzt87Q@mail.gmail.com> <BANLkTim4kHycVmtQvDYy4rXz9KApguak=g@mail.gmail.com> <BANLkTiksGud8_Z=+_fu8ij4T+6gizcGt+w@mail.gmail.com> <BANLkTinS=EDuRMU6ZA8N4f2ypgiztf7yMg@mail.gmail.com> <BANLkTinBTiQhccb+JrKtCLmCZZs7OeTKJw@mail.gmail.com>
Date Thu, 12 May 2011 18:08:05 +1000
Subject Re: NewBie Doubt in Python Thread Programming
From Chris Angelico <rosuav@gmail.com>
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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1453.1305187694.9059.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Thu, May 12, 2011 at 3:35 PM, vijay swaminathan <swavijay@gmail.com> wrote:
> I tried using QThread as well.. But the problem is, on the run method when i
> invoke the command prompt, it sends out the finished signal...  I want it to
> send out the finished signal only on closing the command prompt that is
> invoked earlier in my process.

>         subprocess.call(["start", "/DC:\\PerfLocal_PAL",
> "scripts_to_execute.bat"], shell=True)

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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: NewBie Doubt in Python Thread Programming Chris Angelico <rosuav@gmail.com> - 2011-05-12 18:08 +1000

csiph-web