First page Back Continue Last page Overview Graphics
Sample Code - GUI
def OnGetFile(self):
...
self.makecall(getfile, path, self.OnGetFileResult, path)
def OnGetFileResults(self, path, exception, data):
- if exception is not None: raise exception
- ...
def makecall(self, callfunc, args, resultfunc, resargs):
self.queue.put( (callfunc, args, resultfunc, resargs) )
Notes:
This demonstrates splitting a function into two (OnGetFile) and how the request is sent to a worker thread (makecall)