Re: [C++-sig] boost::python::throw_error_already_set not in library

2008-12-15 Thread Rocketman@JSC
Problem Solved: The symbols are in the shared object, and as David mentioned, one must use the -T to see them in a debug library. The problem was with the intel linker (via eclipse). Apparently the linker will not tell you whether a shared library is actually included using -l to add to a shared

Re: [C++-sig] preventing boost::python::throw_error_already_set

2008-12-15 Thread Stefan Seefeld
Leonard Ritter wrote: searching for __cxa_allocate_exception segfault i got quite a few hits in different projects, of which this wiki entry devotes a whole page to the issue: http://wiki.fifengine.de/Segfault_in_cxa_allocate_exception The funny thing is: I never got the problem on a machin

Re: [C++-sig] custom constructor problems

2008-12-15 Thread Ralf W. Grosse-Kunstleve
I think this is related: http://mail.python.org/pipermail/cplusplus-sig/2006-March/010092.html http://mail.python.org/pipermail/cplusplus-sig/2006-March/010095.html I gave up on the obj1 == obj2 comparison idea and added a ..memory_id() method, which returns the memory location (cast to Python in

Re: [C++-sig] preventing boost::python::throw_error_already_set

2008-12-15 Thread Leonard Ritter
solved! On Mon, Dec 15, 2008 at 5:48 PM, Leonard Ritter wrote: > searching for __cxa_allocate_exception segfault i got quite a few hits in > different projects, of which this wiki entry devotes a whole page to the > issue: > > http://wiki.fifengine.de/Segfault_in_cxa_allocate_exception > > The f

Re: [C++-sig] preventing boost::python::throw_error_already_set

2008-12-15 Thread Leonard Ritter
On Mon, Dec 15, 2008 at 5:38 PM, Leonard Ritter wrote: > i tried both 1.34.1 and 1.35.0 available in my distribution (ubuntu), same >>> problem. i am fetching through the boost.python code to see if i can find >>> something interesting. >>> >> >> i should add that this problem does not happen on

Re: [C++-sig] preventing boost::python::throw_error_already_set

2008-12-15 Thread Leonard Ritter
On Mon, Dec 15, 2008 at 5:33 PM, Leonard Ritter wrote: > On Mon, Dec 15, 2008 at 5:29 PM, Leonard Ritter wrote: > >> On Mon, Dec 15, 2008 at 5:27 PM, Stefan Seefeld wrote: >> >>> The throw point isn't very interesting in this case: In Python, iteration >>> is terminated by means of a 'StopIterat

Re: [C++-sig] preventing boost::python::throw_error_already_set

2008-12-15 Thread Leonard Ritter
On Mon, Dec 15, 2008 at 5:29 PM, Leonard Ritter wrote: > On Mon, Dec 15, 2008 at 5:27 PM, Stefan Seefeld wrote: > >> The throw point isn't very interesting in this case: In Python, iteration >> is terminated by means of a 'StopIteration' exception. The question is why >> this exception manages to

Re: [C++-sig] preventing boost::python::throw_error_already_set

2008-12-15 Thread Leonard Ritter
On Mon, Dec 15, 2008 at 5:27 PM, Stefan Seefeld wrote: > The throw point isn't very interesting in this case: In Python, iteration > is terminated by means of a 'StopIteration' exception. The question is why > this exception manages to escape uncaught. i tried both 1.34.1 and 1.35.0 available in

Re: [C++-sig] preventing boost::python::throw_error_already_set

2008-12-15 Thread Stefan Seefeld
troy d. straszheim wrote: In short (i'm guessing this is more or less what you'll need): gdb --args /usr/bin/python /path/to/my/python/script.py run # it runs, throws an exception, but the stacktrace isn't helpful catch throw # this only works after the first run run # jackpot, yo

Re: [C++-sig] preventing boost::python::throw_error_already_set

2008-12-15 Thread troy d. straszheim
Hey Leonard, Here's a short doc about running python scripts that load boost::python bindings under gdb: http://software.icecube.wisc.edu/offline-software.trunk/gdb_python.html In short (i'm guessing this is more or less what you'll need): gdb --args /usr/bin/python /path/to/my/python/scri

Re: [C++-sig] preventing boost::python::throw_error_already_set

2008-12-15 Thread Leonard Ritter
On Sun, Dec 14, 2008 at 11:22 PM, Leonard Ritter wrote: > That's hard to tell without more context: Who is doing the iteration, for >> example ? > > I'm sorry. I was a bit stressed out yesterday. I recognize that you only want to help, and I should be more patient. Here is the top part of a stac

[C++-sig] custom constructor problems

2008-12-15 Thread Renato Araujo
Hi again :D, To solve my old problem, I'm trying create custom constructor which return a shared_ptr like that code: cla

Re: [C++-sig] Dynamic resolution of members and methods

2008-12-15 Thread Jérémie Delaitre
Hi, When defining my new type in C++, I have set the "tp_getattro" field to point to a function (say "mytype_getattro"). This function determine dynamically if the requested attribute exists or not, and if it does, return its value. So, it works well for attributes/properties. But, "mytype_g