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.

I want to develop GUI in Python for geoprocessing, but I don't know what is the best GUI tool or library (Tkinter, PyQT, wxPython) for geoprocessing? Can I use PyQT for GUI programming in ArcGIS?

share|improve this question

4 Answers 4

up vote 17 down vote accepted

I have a question for you: why do you need your own GUI for geoprocessing? The idea of a geoprocessing tool is that it goes through the standard interfaces (the GP progress dialog if enabled for messages and a progress dialog, the GP tool dialog for setting parameters and running the tool, etc) and I'd like to hear the use case for trying to circumvent that all.

All in all: it's all a matter of what works best for you.

  1. Tkinter is built-in but kind of ugly and hard to get anything sophisticated up and running, but if you do write a UI in it, it'll run pretty much anywhere.
  2. Wx and PyQT are both close to functionally equivalent, though the wxPython examples are great to learn from and QT's developer tools are a little bit nicer. Look at the APIs of both and determine which one looks nicer for you to use.

I failed to mention that PyQT seems to work in a slightly more stable fashion in ArcMap and other programs with their own event loops than Wx or Tk. Wx and Tk programs tend to expect to be the only ui threads running in a process and misbehave with the event loops in other GUI programs.

share|improve this answer

I'm with Jason - You should really consider the necessity of a groprocessing GUI, as the ARCGIS GP progress dialog (at least in 9.3.1, don't know about 10) can be customized a bit to adjest to your needs (adding messages, logfiles, progressor bars and such).

From my experience, Tkinter is easy to understand but complicated when wanting very out-of-the-box designs. Also, there are times it didn't interact very well with ArcGIS (windows disappearing and such). There is a "simplified" GUI library called EASYGUI which is based on Tkinter, and is much nicer and easier to control. I played with it a bit and found it to be a lot friendlier than Tkinter.

share|improve this answer
    
thank you for your help :) –  wetland Mar 7 '11 at 10:41

You could just build the GUI in .NET or Mono and then run the Python script through the Process object.

share|improve this answer

I've tried what you want to do, and Jason's right--use the built in tools. If you try and run just about any set of python gui widgets inside the Arcmap process, you will run into trouble of various kinds--I've tried it. Best to run your GUI outside process, and talk back to Arcmap through COM Arcobjects, using IGeoprocessor to run tools. But if your object is simply running geoprocessing tools and scripts, you really can't do much better than building your own toolbox tools and using the standard tool interfaces.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.