Auto GUI checker function

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Auto GUI checker function

Nicholas Earl
Hey everyone,

I cannot seem to find anything in the docs, but I have an issue where my GUI has a button which, when pressed, goes about generating a plot. This can take awhile, and the GUI usually freezes up. I've been trying to find a way to multithread it (with avoiding the issues of running any plot-displaying code in the thread, since GUI must run in main).

My issue is how can I tell the GUI that the plot has finished and that it can display the resulting plot? I figured there might be a checker function of the form

def check_for_plot(self, thread):
    if thread.isAlive():
        self.after(500, self.check_for_plot(thread))

But there doesn't seem to be any built in function. I am wondering if anyone is aware of, or uses, a more efficient way to generate plots without holding up the GUI loop?

Thanks again for all your guys' patience!

Nicholas Earl
Graduate Teaching Associate
San Diego State University

Enthought-Dev mailing list
[hidden email]