[C++-sig] Global variables (standard C/C++ types)

Stefan Seefeld seefeld at sympatico.ca
Tue Mar 11 00:34:32 CET 2008


pawell wrote:
> I would like to use Python in my game engine as a script language but first I
> want to test Python as console (something like interactive mode). I tested
> boost.python and encountered problem. I want to expose global variables so I
> can use them in some module (__main__ for example). I found I can use
> something like "scope().attr("var_name") = object(ptr(var_ptr))" but it
> works only with classes (like std::string or my own). Is there simple way to
> expose such variables? I've searched a lot but found nothing :/

I'm not sure what exactly you are referring to as "it works...". What 
variables (or better, what types) do you want to expose that don't "work" ?

Regards,
		Stefan

-- 

       ...ich hab' noch einen Koffer in Berlin...



More information about the Cplusplus-sig mailing list