1

I'm running a script that executes another software. When that software is finished with its job, my script opens that job and extracts information.

This information is essential for the rest of my script. If I am satisfied with the info from the job, I move on. If not, I change some parameters and do it again.

In order for me to wait for the job to be completed I do something like this:

while( str(job.out.message) != 'completed'):
    time.sleep(10)

Here I want to the while-loop to keep the script occupied checking the job status until the job changes status to complete.

The thing is that I can't use the software for other tasks while my script is running. I think it is due to the time.sleep()

What are my other options?

tore
  • 303
  • 3
  • 11

1 Answers1

2

That's because it block the thread, it's right. You can try to use multithreading programming.

user840718
  • 1,563
  • 6
  • 29
  • 54