8
votes

I am looking for a Python GUI library that I can rewrite the rendering / drawing.

It has to support basic widgets (buttons, combo boxes, list boxes, text editors, scrolls,), layout management, event handling

The thing that I am looking for is to use my custom Direct3D and OpenGL renderer for all of the GUI's drawing / rendering.

edit suggested by S.Lott: I need to use this GUI for a 3D editor, since I have to drag and drop a lot of things from the GUI elements to the 3d render area, I wanted to use a GUI system that renders with Direct3D (preffered) or OpenGL. It also has to have a nice look. It is difficult to achieve this with GUI's like WPF, since WPF does not have a handle. Also it needs to be absolutly free for commercial use.

edit: I would also like to use the rendering context I initialized for the 3d part in my application

5
@S.Lott: I considered GTK and PyGTK, but it seems rather difficult to overwrite the render. Plus the fact that it brings in a lot of dependencies. I was looking for something simple - costy.petrisor
"It has to support basic widgets... layout management, event handling" vs. "I was looking for something simple". I don't think you can find both. Please update your questions with enough information that we can figure out what you're looking for. - S.Lott
can you actually provide a sketch of the UI you wish to implement. I Don't think you need quite what you are asking for in normal circumstances, even for a 3D program. - SingleNegationElimination

5 Answers

2
votes

I don't know what are you working at, so maybe this is not what you're looking for, but: Have you considered using Blender + its Game Engine?

It supports Python scripting, and provides some APIs to create "standard" GUIs too, while allowing you to do a lot of cool stuff with 3d models. This could be especially useful if your application does a lot of 3d models manipulation..

Then you can "compile" it (it just builds the all-in-one package containing all the dependencies, in a way similar to what py2exe does) for any platform you need.

1
votes

You can use Qt Scene Framework with OpenGL rendering. There are many examples on Nokia site.

1
votes

The best Python GUI toolkit is wxPython (also known as wxWidgets).

This is not merely my opinion, see also: wxPython quotes

wxPython is the best and most mature cross-platform GUI toolkit, given a number of constraints. The only reason wxPython isn't the standard Python GUI toolkit is that Tkinter was there first. -- Guido van Rossum

I can't say how easy or hard it would be to add your own renderer.

0
votes

There are OpenGL bindings in Python that will get you 3D rendering. Personally, I'd use wxpython as your 'gui' manager and use the bindings to do opengl for the rest. Wx has the necessary demos (check the wxpython demos installation) and information in their GLCanvas demos.

Another sample code is here too.