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


Groups > comp.lang.python > #5226

Re: NewBie Doubt in Python Thread Programming

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 <rosuav@gmail.com>
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 <BANLkTikqan+Gd-tz-p89VU-EgoC1kGEc6A@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> <BANLkTimDx0qBG5k0kZJ1Xh_kSenPB_aWHA@mail.gmail.com> <BANLkTikqan+Gd-tz-p89VU-EgoC1kGEc6A@mail.gmail.com>
Date Thu, 12 May 2011 20:46:15 +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
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.1460.1305197177.9059.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Thu, May 12, 2011 at 7:42 PM, vijay swaminathan <swavijay@gmail.com> 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

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 20:46 +1000

csiph-web