from wxPython.wx import *
import processing


import sys
class Window ( wxFrame ):
    def __init__ ( self ):
        wxFrame.__init__ ( self, None, wxID_ANY, 'Title', size = ( 500, 350 ) )
        self.dialog = wxProgressDialog ('Progress', 'PROCESSING DATA ...', maximum = 500 )
        x=0
        while processing.check_processing() == 'processing':
            self.dialog.Update ( x, 'Working for you .. \n' + str ( x ) + ' seconds elapsed.\n\nPlease be patient ...' )
            wxSleep(5)
            x+=5

        processing.del_temp_file()

        self.dialog.Update ( 500, 'Finished!')
        wxSleep(3)    
        sys.exit()
        
application = wxPySimpleApp()

window = Window()

application.MainLoop()


