Python GUI for C program [was: ]

sturlamolden sturlamolden at yahoo.no
Tue Jul 6 14:14:21 EDT 2010


On 6 Jul, 13:45, Thomas Jollans <tho... at jollans.com> wrote:

> 1. Turn your C program into a library, and write a Python extension

Note that using ctypes, Cython or Boost.Python is much less painful
than using Python's C API directly.

> It might, however, be best to simply write the GUI in C as well, which
> would avoid the overhead of loading Python and isn't all that difficult
> either. If you know C++, check out wxWidgets and Qt4. To stick with
> plain C, have a look at GTK+.

You will hardly notice the overhead of loading Python. (It's not
Java...)

Also a good GUI builder is far more important than language when it
comes to making a GUI. Depending on toolkit my preferences are
wxFormBuilder, Qt Designer, GLADE or MS Visual Studio.

- wxFormBuilder are beginning to be ok for wxPython development
without XRC, finally.

- PyQt has licensing issues, although Qt is LGPL. PySide is still
incomplete.

- GLADE/PyGTK has issues on Windows (e.g. need to supply a GTK+ run-
time).

- Visual Studio can be used for IronPython .NET and native MFC
(pywin32 has MFC bindings).

- tkinter generally sucks (tedious to use, looks bad).








More information about the Python-list mailing list