23#include <boost/filesystem.hpp>
27namespace po = boost::program_options;
28namespace fs = boost::filesystem;
32const std::string PYTHON_CONFIG_FILE {
"python-config-file" };
44 return {{
"Measurement config", {
45 {PYTHON_CONFIG_FILE.c_str(), po::value<std::string>()->default_value({},
""),
46 "Measurements python configuration file"},
47 {PYTHON_ARGV.c_str(), po::value<std::vector<std::string>>()->multitoken(),
48 "Parameters to pass to Python via sys.argv"}
54 auto filename = args.
find(PYTHON_CONFIG_FILE)->second.as<
std::string>();
55 if (!filename.empty() && !fs::exists(filename)) {
63 auto filename = args.
find(PYTHON_CONFIG_FILE)->second.as<
std::string>();
64 if (!filename.empty()) {
66 if (args.
find(PYTHON_ARGV) != args.
end()) {
69 singleton.runFile(filename, argv);
71 singleton.setupContext();