[C++-sig] Under what conditions would PyRun_SimpleFile return false?

Stefan Seefeld seefeld at sympatico.ca
Tue Aug 22 13:41:50 CEST 2006


Blake Skinner wrote:
> Thanks for the help, but...

Sorry for the late reply.

> I'm sorry, but where do I get the global and local scopes from?  I didn't see
> that mentioned in the boost python tutorial or the one on python.org.

These scopes can be used to pass context information (global and local variables)
around, such as from one call to exec to the next. You can pass empty
dictionaries, even the same for global and local.

  dict global;
  object result = exec_file(script_name, global, global);

should just work.

HTH,
		Stefan

-- 

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



More information about the Cplusplus-sig mailing list