[pygtk] pygtk/c extension

2007-04-04 Thread Bernhard Lohkamp
Hi, I try to wrap some c functions for python (pygtk) use and followed pygtk FAQ and Ross Burtons instruction ('Wrap GObjects in Python'). So I use: pygobject_new((GObject*) widget); to return a pygtk object. This works fine for not existing c widgets and it creates a new pygtk widget. However

[pygtk] PyGtk/C extension - segfault

2003-11-11 Thread Tomas Bouda
Hi, a few days ago, I've got a great help on gtk<->pygtk objects wrapping. Thanks a lot. Now, I have the library but the application crashes on segfault. I've been thinking it is problem of mine or problem of Python but PyGtk seems to have own part of this too. My program looks like: /* p

Re: [pygtk] PyGtk/C extension - segfault

2003-11-11 Thread Tobbi
Hi all, problem finally solved, see bellow. - Original Message - From: "Tobbi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 11, 2003 11:48 AM Subject: Re: [pygtk] PyGtk/C extension - segfault >Hi James, > > > > > Y

Re: [pygtk] PyGtk/C extension - segfault

2003-11-11 Thread Tobbi
Hi James, > > You didn't compile your cavfs module with debug info (or alternatively, > you passed -export-symbols-regex to an unpatched libtool when linking > your module). When this happens, gdb makes its best guess about what > function the stack frame refers to based on what it finds in th

Re: [pygtk] PyGtk/C extension - segfault

2003-11-10 Thread James Henstridge
On 10/11/2003 7:52 PM, [EMAIL PROTECTED] wrote: Hi, a few days ago, I've got a great help on gtk<->pygtk objects wrapping. Thanks a lot. Now, I have the library but the application crashes on segfault. I've been thinking it is problem of mine or problem of Python but PyGtk seems to have own par

Re: [pygtk] PyGtk/C extension - segfault

2003-11-10 Thread Malcolm Tredinnick
On Mon, 2003-11-10 at 22:52, [EMAIL PROTECTED] wrote: > Hi, > a few days ago, I've got a great help on gtk<->pygtk objects wrapping. > Thanks a lot. > > Now, I have the library but the application crashes on segfault. I've been > thinking it is problem of mine or problem of Python but PyGtk see

[pygtk] PyGtk/C extension - segfault

2003-11-10 Thread tomas . bouda
Hi, a few days ago, I've got a great help on gtk<->pygtk objects wrapping. Thanks a lot. Now, I have the library but the application crashes on segfault. I've been thinking it is problem of mine or problem of Python but PyGtk seems to have own part of this too. My program looks like: /* py

Re: [pygtk] pyGtk/C extension

2003-11-06 Thread Andreas Kostyrka
On Thu, Nov 06, 2003 at 07:00:49AM -0600, David Farning wrote: > > > > cc `pkg-config --cflags gtk+-2.0 pygtk-2.0` -I/usr/include/python2.2/ > > > > -I. -c -o pkglist.o pkglist.c > > > > In file included from gtkpkglist.h:24, > > > > from pkglist.override:7: > > > > rpackageliste

Re: [pygtk] pyGtk/C extension

2003-11-06 Thread David Farning
On Thu, 2003-11-06 at 05:59, David Farning wrote: > On Thu, 2003-11-06 at 05:32, Christian Robottom Reis wrote: > > Well, one of us is confused; the issue is finding out which one > > > Well the confused one would be me. > > On Thu, Nov 06, 2003 at 04:16:47AM -0600, David Farning wrote: > > > I

Re: [pygtk] pyGtk/C extension

2003-11-06 Thread David Farning
On Thu, 2003-11-06 at 05:32, Christian Robottom Reis wrote: > Well, one of us is confused; the issue is finding out which one > Well the confused one would be me. > On Thu, Nov 06, 2003 at 04:16:47AM -0600, David Farning wrote: > > I have been moving all of my *.h's *.cc's to my build directory

Re: [pygtk] pyGtk/C extension

2003-11-06 Thread Christian Robottom Reis
Well, one of us is confused; the issue is finding out which one On Thu, Nov 06, 2003 at 04:16:47AM -0600, David Farning wrote: > I have been moving all of my *.h's *.cc's to my build directory in order > to meet dependencies. But, now I'm wondering what to do about system > dependencies > > #

Re: [pygtk] pyGtk/C extension

2003-11-06 Thread David Farning
On Wed, 2003-11-05 at 16:50, Tim Evans wrote: > David Farning wrote: > > >> - To create a python gtk widget from a C gtk widget: > >> pygobject_new((GObject*) widget); > >> If a python wrapper for 'widget' already exists, it will incref and > >> return that, other wise it will create a n

Re: [pygtk] pyGtk/C extension

2003-11-06 Thread Tobbi
Hi, thanks all, you really helped me a lot. - Original Message - From: "Tim Evans" <[EMAIL PROTECTED]> To: "David Farning" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, November 05, 2003 11:50 PM Subject: Re: [pygtk] pyG

Re: [pygtk] pyGtk/C extension

2003-11-05 Thread Tim Evans
David Farning wrote: - To create a python gtk widget from a C gtk widget: pygobject_new((GObject*) widget); If a python wrapper for 'widget' already exists, it will incref and return that, other wise it will create a new python wrapper object. Do you possibly have a concrete example for

Re: [pygtk] pyGtk/C extension

2003-11-05 Thread David Farning
On Wed, 2003-11-05 at 14:59, Tim Evans wrote: > Tobbi wrote: > >Hi, > > I'm actually developing an application standing at Gtk having two parts > > - Ansi C and Python. > > The problem I met is how to get a C pointer of Gtk object relating to > > Python pyGtk object and vice versa. > > > >

Re: [pygtk] pyGtk/C extension

2003-11-05 Thread Christian Robottom Reis
On Thu, Nov 06, 2003 at 09:59:25AM +1300, Tim Evans wrote: > Tobbi wrote: > >I'm actually developing an application standing at Gtk having two parts > >- Ansi C and Python. > >The problem I met is how to get a C pointer of Gtk object relating to > >Python pyGtk object and vice versa. > > Others

Re: [pygtk] pyGtk/C extension

2003-11-05 Thread Tim Evans
Tobbi wrote: Hi, I'm actually developing an application standing at Gtk having two parts - Ansi C and Python. The problem I met is how to get a C pointer of Gtk object relating to Python pyGtk object and vice versa. Example: Python: button = gtk.Button() C: gtk_widget_destroy(button) I'v

Re: [pygtk] pyGtk/C extension

2003-11-05 Thread Christian Robottom Reis
On Wed, Nov 05, 2003 at 04:22:16PM +0100, Tobbi wrote: >Example: > >Python: >button = gtk.Button() >C: >gtk_widget_destroy(button) Actually, the Python counterpart is button.destroy() >I've found some solution speaking about "_o" field of pyGtk object. This is o

[pygtk] pyGtk/C extension

2003-11-05 Thread Tobbi
   Hi, I'm actually developing an application standing at Gtk having two parts - Ansi C and Python. The problem I met is how to get a C pointer of Gtk object relating to Python pyGtk object and vice versa.   Example:   Python: button = gtk.Button() C: gtk_widget_destroy(button)   I've found so