NewBie Doubt in Python Thread Programming

Chris Angelico rosuav at gmail.com
Thu May 12 04:08:05 EDT 2011


On Thu, May 12, 2011 at 3:35 PM, vijay swaminathan <swavijay at 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



More information about the Python-list mailing list