What is your favorite Python GUI package?

3211
4
04-12-2014 08:39 AM
AdamCrateau1
Occasional Contributor
My primary goal will be to create add-ins using Python that include some GUIs. 

Beyond that, I'm interested in creating some stand alone Python apps and wondering what is the best all around development package. 

Many Thanks
Tags (2)
0 Kudos
4 Replies
MattEiben
Occasional Contributor
Well to my knowledge, the only built in package is Tkinter.  It's a really an ugly UI out of the box, but I've found if you use it with the ttk module, you can make some relatively modern looking Apps.  Unfortunelty, there's no visual interface for building Apps using these modules, you'll probably end up building your interfaces through code.

In my experience, ArcMap doesn't play well with Tkinter when trying to launch a custom GUI from a Python Add In.  When trying it in 10.2, ArcMap immediately crashed without even an error window.  However, I found if you launch your GUI through a separate Python file by calling on it using the subprocess module, the custom Python GUI in ArcMap works great!  If your GUI takes in parameters that is needed to pass back to the main Python AddIn file, you can pass it back as text through the subprocess stdout.

If you're interested in how to run a Tkinter GUI through the subprocess module, I can dig up a code example for you.

I know there are some other libraries out there that offer alternative Python based GUIs, but since they're not built in, my experience has mostly been Tkinter based.

Hope this helps!
FranRaga
New Contributor

Hi Matt.

I'm interested in how run a subprocess module.

Can you send me a code example?

Thanks

Regards

0 Kudos
AlexanderWinz
New Contributor II

Hey Franccisco,

I wrote you an Email with my TKinter/Arcpy/Subprocesses combination.

I hope it helps yout to get an overview.

greetings,

Alex

0 Kudos
LT
by
Occasional Contributor
pyQt and wxPython are popular.  It will take some time to learn either, but it sounds like you're ready for that. There are lots of tutorials and documentation for both out there.
0 Kudos