[C++-sig] How to create embedded packages?

2008-10-24 Thread Robert Dailey
Hi, I am currently embedding the python interpreter. I'm doing this because I want my application to be able to execute python scripts. I'm also using Boost.Python to create modules to extend the functionality of python scripts executed through my application. Note that no PYD files are generated

[C++-sig] Calling import() multiple times for the same module

2008-10-24 Thread Robert Dailey
Hi, What happens if I do the following? using namespace boost::python; import( "__main__" ).attr( "new_global" ) = 40.0f; import( "__main__" ).attr( "another_global" ) = 100.0f: My main concern here is performance. I'm wondering if each call to import() results in a disk query for the script i

[C++-sig] Private construction for python objects?

2008-10-24 Thread Robert Dailey
Hi, I have a C++ class that I'm exposing to Python via the Boost.Python library. This specific class is only created from C++. In other words, it doesn't serve the user very much good to construct an instance of this class from Python. A typical use case for obtaining an instance of this class fro

Re: [C++-sig] Calling import() multiple times for the same module

2008-10-27 Thread Robert Dailey
On Fri, Oct 24, 2008 at 1:07 PM, Stefan Seefeld <[EMAIL PROTECTED]>wrote: > Robert Dailey wrote: > >> Hi, >> >> What happens if I do the following? >> >> using namespace boost::python; >> >> import( "__main__" ).attr( "