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


Groups > comp.lang.python > #5226

Re: NewBie Doubt in Python Thread Programming

References (7 earlier) <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 2011-05-12 20:46 +1000
Subject Re: NewBie Doubt in Python Thread Programming
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1460.1305197177.9059.python-list@python.org> (permalink)

Show all headers | 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