GTK libs don't get events when wrapped for Python

Mark Asbach asbach at ient.rwth-aachen.de
Wed Jan 12 22:34:53 CET 2005


Hi list,

I've got a crazy problem: an application fully written C and using a
third-party library that itself uses GTK to draw some GUI widgets works
as expected. But if I wrap the lib with SWIG and use it in Python,
everythings works but the GUI parts.

In fact, it looks like the library doesn't get events / messages from
the window manager or these events have a significant delay.

For example, I want to open a window and draw an image into it. This
means two library calls. The first one should draw the window (but it
only does when calling it from a C-only binary), the second one should
resize the window and draw the image, but when called from python just
draws the window. Occasionally, resize and in rare circumstances drawing
of the image occur on subsequent calls of the library.

Really strange and I don't have a clue where to look for a remedy. Is
there anybody who could help me, please?

FYI: the library used is Intel's OpenCV / HighGui, OS is debian/Sarge,
python2.3

Thanks in advance,

Mark
-- 
  Dipl.-Ing. Mark Asbach                         Tel +49 (0)241 80-27677
  Institute of Communications Engineering
  RWTH Aachen University, Germany         http://www.ient.rwth-aachen.de



More information about the Python-list mailing list