0

i'm writing a simple gui script A which is calling another script B in it. Scrip B has subprocess in it which takes some time. I would like to print something like "processing..." in one of the labels on that gui and that print should be there until subprocess from script B is finished. How i can do that?

edit:

If i should have to listen for termination of subprocess of script A from script A i would simply name that process (i.e p) and check its p.poll(). Since that subprocess is product of antorher script B, i thought if i could name that process and import that script B in script A and then check for p.poll. But i faced another problem, i couldn't import script B to A. The steps i was doing were from: Importing variables from another file? Every time i got message that there is no such file. Fortunately at the end i found another way around to achieve what i wanted.

dj dj
  • 1
  • 2

1 Answers1

0

I would split this task into two stages:

  1. get subprocess PID.
  2. check whether PID is still running.
Peter Trcka
  • 1,279
  • 1
  • 16
  • 21