[C++-sig] python extended object to native c++ pointer

Mark Chandler admin at lodle.net
Wed Sep 2 02:51:22 CEST 2009

I worked out what was causing it. I was using a diff dict for global  
and local thus locals couldnt see globals and globals couldnt see  

Thanks for your help

On 31/08/2009, at 9:12 PM, Mark Chandler wrote:

> im using boost 1_36_0 as the latest has compile issues.
> im loading it via the boost call:
> return boost::python::exec_file(file, GetGloablDict(), GetLocalDict 
> ());
> where GetGloablDict is the main dict and GetLocalDict is a copy for  
> this instant
> Stefan Seefeld wrote:
>> On 08/31/2009 08:57 AM, Mark Chandler wrote:
>>> Stefan i spent sooooo long on this thank you!
>>> I got another quick question, how do i define the class in the  
>>> global namespace but still refer to it in functions? I want to do  
>>> something like this but keep getting compile errors.
>> The script itself looks fine (apart from some indentation quirks,  
>> which may stem from your use of tabs).
>> I seem to remember some issues with global and local namespaces in  
>> boost::python::exec(), which may relate to this. What version of  
>> boost are you using ? How do you call exec() from C++ ?
>> Regards,
>>        Stefan
> _______________________________________________
> Cplusplus-sig mailing list
> Cplusplus-sig at python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig

More information about the Cplusplus-sig mailing list