#include <src/JobOptionsSvc/PythonConfig.h>
Definition at line 25 of file PythonConfig.h.
Definition at line 28 of file PythonConfig.h.
SmartIF< IJobOptionsSvc > m_IJobOptionsSvc
Definition at line 8 of file PythonConfig.cpp.
14 object main_module( ( handle<>( borrowed( PyImport_AddModule(
"__main__" ) ) ) ) );
15 object main_namespace = main_module.attr(
"__dict__" );
18 main_namespace[
"PythonAdaptor"] = class_<PythonAdaptor>(
"PythonAdaptor", boost::python::init<IJobOptionsSvc*>() )
23 main_namespace[
"adaptor"] = ptr( &adaptor );
28 command += filename +
"'.split(','): execfile(name)\n";
29 command +=
"from GaudiKernel.Configurable import expandvars\nfrom GaudiKernel.Proxy.Configurable import " 30 "applyConfigurableUsers\napplyConfigurableUsers()\n";
32 command +=
"\nfor n, c in Configurable.allConfigurables.items():\n for p, v in c.getValuedProperties().items() " 33 ":\n v = expandvars(v)\n if type(v) == str : v = '\"%s\"' % v # need double quotes\n elif " 34 "type(v) == long: v = '%d' % v # prevent pending 'L'\n adaptor.addPropertyToJobOptions(n,p,str(v))";
37 handle<> ignored( ( PyRun_String(
command.c_str(), Py_file_input, main_namespace.ptr(), main_namespace.ptr() ) ) );
38 }
catch (
const error_already_set& ) {
constexpr static const auto FAILURE
void addPropertyToJobOptions(const std::string &client, const std::string &name, const std::string &value)
constexpr static const auto SUCCESS
SmartIF< IJobOptionsSvc > m_IJobOptionsSvc
The documentation for this class was generated from the following files: