Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

As a component of my add-in, I compute a bunch of summary statistics when the user clicks a button. This can take a while to process and it can appear as though the program has stopped responding. I would like to add a dialog box which can indicate to the user that the program is still processing. I was interested in using wxPython, but I don't necessarily want to rely on users installing dependencies that aren't included with the standard bundle.

Any good ideas?

I was considering something like this (except for my concern above):

share|improve this question
    
If you want to use Python, and you only want to use built-in libraries, then your only choice is Tkinter. I have not heard much in the way of success stories using Tkinter with Python add-ins, though. Problems with threading and the event loop will probably get in your way. If you want this level of control over the UI, I suspect you'll need to use C++ or .NET. –  blah238 Nov 22 '13 at 4:59
1  
Ok I have not tried this so no idea if it works but if you want to continue using python rather than. NET as suggested by blah 238 then how about this? Move all your code out into a python script tool in a tool box where you can create and control a progress bar and call this tool from within your addin using the python add-in module GPToolDialog? –  Hornbydd Nov 22 '13 at 10:58
1  
@Hornbydd, this sounds interesting. How would I pass variables back and forth? I would need to set parameters programmatically rather than having the user interact with a tool GUI. –  ShaunLangley Nov 22 '13 at 14:27
    
Good point, may be that's the weakness in my idea? I would try a simple dumb script to see if it actually works? I guess if you cannot pass parameters directly you could pass parameters by writing to a known folder location and your script tool reads those in as a text file? –  Hornbydd Nov 22 '13 at 15:43
    
@blah238 I think you should write your Comment on this one up as an Answer. –  PolyGeo Apr 12 '14 at 5:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.