R
Robert Dailey
Hi,
I'm currently using boost:ython::import() to import Python modules,
so I'm not sure exactly which Python API function it is calling to
import these files. I posted to the Boost.Python mailing list with
this question and they said I'd probably get a better answer here, so
here it goes...
If I do the following:
using namespace boost:ython;
import( "__main__" ).attr( "new_global" ) = 40.0f;
import( "__main__" ).attr( "another_global" ) = 100.0f:
Notice that I'm importing twice. What would be the performance
consequences of this? Do both import operations query the disk for the
module and load it into memory? Will the second call simply reference
a cached version of the module loaded at the first import() call?
Thanks.
I'm currently using boost:ython::import() to import Python modules,
so I'm not sure exactly which Python API function it is calling to
import these files. I posted to the Boost.Python mailing list with
this question and they said I'd probably get a better answer here, so
here it goes...
If I do the following:
using namespace boost:ython;
import( "__main__" ).attr( "new_global" ) = 40.0f;
import( "__main__" ).attr( "another_global" ) = 100.0f:
Notice that I'm importing twice. What would be the performance
consequences of this? Do both import operations query the disk for the
module and load it into memory? Will the second call simply reference
a cached version of the module loaded at the first import() call?
Thanks.