Abhijit Bansal wrote:
I made up a wxPython GUI. In there I have a RUN Button, on clicking
that button some task takes place. There is a particular command that
takes more than a couple of minutes to take place. In that command I
access another software through API and run something on it. I was
wondering if there a was a way that I can stop it mid way somehow .
The problem is its just one command and not a set of commands!
If they did not provide an "escape hatch", then there is no good way to
add one. Usually, if a vendor has an operation that takes a long time,
they have a "progress" callback that gets called occasionally, which can
abort the operation.
···
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
indeed -- if there is no such escape hatch, you might try using the
multiprocessing package to run it in another process -- then you can
kill it if you need to -- it won't be a clean shut-down though.
-Chris
···
On Mon, Jun 18, 2012 at 3:54 PM, Tim Roberts <timr@probo.com> wrote:
In that command I
access another software through API and run something on it. I was
wondering if there a was a way that I can stop it mid way somehow .
If they did not provide an "escape hatch", then there is no good way to
add one. Usually, if a vendor has an operation that takes a long time,
they have a "progress" callback that gets called occasionally, which can
abort the operation.
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov