[C++-sig] sys.exit() and PyRun_SimpleFileExFlags()

2009-07-08 Thread Xavier Bénech
Hi, There is a behaviour I do not understand of PyRun_SimpleFileExFlags(), normally when it executes a python script containing a sys.exit(), it results by ending the calling application. I have got this behaviour with PyRun_SimpleFileExFlags() when I call it from the main thread of a GUI a

Re: [C++-sig] boost::python and threads

2009-07-08 Thread Renato Araujo
Ok I made 2 modifications and I got this working here. Try this. 51,54c50 < virtual void onTick() { < if (object o = get_override("onTick")) < o(); < } --- > virtual void onTick() { get_override("onTick")(); } 60d55 < PyEval_InitThreads(); 65a61 > BR

Re: [C++-sig] boost::python and threads

2009-07-08 Thread Paul Scruby
Hi Renato, Okay, I have installed Python 2.4.2 with gcc 4.1.2 on Linux and it's crashing in the same place as on Solaris. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x41074940 (LWP 12004)] 0x00307740c850 in sem_post () from /lib64/libpthread.so.0 (gdb)

Re: [C++-sig] pybindgen: allow_subclassing option causing reference parameters to be copied?

2009-07-08 Thread Gustavo Carneiro
2009/7/8 J. Michael Owen > Hello Gustavo, > > I have some further evolved changes for the sequence methods that you may > want to use over my previous version. This is more general, and involves > less code as I realized I could register the sequence methods to just call > the wrapped methods py

Re: [C++-sig] Passing Python classes derived from C++ back into C++

2009-07-08 Thread Paul Scruby
Hi Rento, Got it working now. I did not realize that the wrapper<> automatically handled downcast conversion as well. Thanks, Paul "Renato Araujo" wrote in message news:95291a80907070708p66393027nde354f5b7cc3a...@mail.gmail.com... Hi Paul, You can extend from boost::python::wrapper and u