tags:

views:

164

answers:

4

I've never done any UI programming in python before. What is the best (read most intuitive, easy to use, functional) UI package for python for doing simulations?

I'll be doing a simulation of TSP right now. So I'll have a graph (nodes and edges) where the edges are rapidly changing, along with some selection boxes to choose different styles of the algorithm, choose the number of nodes, etc..

I've already written this code with a command line interface and I'm hoping for something pretty seamless to port in a gui :)

+3  A: 

I am not sure what you mean by "simulations" since the type of UI you want to do depends on what you simulate. But if you want to visualize graphs, networkx is pretty cool.

bayer
Nice thanks for the suggestion. How limited is networkx? I want to do graph simulation while having some selection boxes to alter variables in my code on the fly :)
Chris
A: 

If you have graphs, you should definitely check out PyGraphviz (the interface is pretty similar to the aforementioned networkx)

Agos
A: 

Colleagues of mine are working on a similar-sounding setup to you - they use http://matplotlib.sourceforge.net/ and PyQt - PyQt can add a matplotlib object easily as a widget so the two integrate very well. A tutorial for PyQt is available here: http://www.zetcode.com/tutorials/pyqt4/

Ninefingers
+2  A: 

Such a simulation could be easily coded using:

  1. networkx - for the graph data structures and algorithms
  2. matplotlib - which is used by networkx to visualize graphs
  3. Some GUI framework - PyQt, for instance, for the display and interaction with the user

What's cool is that these can be learned and tried separately. networkx is very powerful and can provide anything you need graph-vise. It works well with matplotlib, and you can show the steps of TSP by different colorings of edges/nodes. matplotlib can also be easily integrated with PyQt to put it all into a single interactive program.

Eli Bendersky