interpreter.hh
Go to the documentation of this file.
1
// -*- mode: c++ -*-
2
// Copyright 2011, Florent Lamiraux, CNRS.
3
4
#ifndef DYNAMIC_GRAPH_PYTHON_INTERPRETER_H
5
#define DYNAMIC_GRAPH_PYTHON_INTERPRETER_H
6
7
#undef _POSIX_C_SOURCE
8
#undef _XOPEN_SOURCE
9
#include "
dynamic-graph/python/api.hh
"
10
#include "
dynamic-graph/python/deprecated.hh
"
11
12
#include "
dynamic-graph/python/python-compat.hh
"
13
#include "
dynamic-graph/python/api.hh
"
14
15
namespace
dynamicgraph
{
16
namespace
python {
22
class
DYNAMIC_GRAPH_PYTHON_DLLAPI
Interpreter
{
23
public
:
24
Interpreter
();
25
~
Interpreter
();
29
DYNAMIC_GRAPH_PYTHON_DEPRECATED
std::string python(
const
std::string& command);
30
33
void
python(
const
std::string& command, std::string& result, std::string& out, std::string& err);
34
37
void
runPythonFile(std::string filename);
38
void
runPythonFile(std::string filename, std::string& err);
39
void
runMain(
void
);
40
43
std::string processStream(std::istream& stream, std::ostream& os);
44
46
PyObject* globals();
47
48
private
:
50
PyThreadState* _pyState;
52
PyObject* globals_;
54
PyObject* locals_;
55
PyObject* mainmod_;
56
};
57
}
// namespace python
58
}
// namespace dynamicgraph
59
#endif // DYNAMIC_GRAPH_PYTHON_INTERPRETER_H
dynamicgraph
Definition:
convert-dg-to-py.hh:8
deprecated.hh
DYNAMIC_GRAPH_PYTHON_DLLAPI
#define DYNAMIC_GRAPH_PYTHON_DLLAPI
Definition:
config.hh:64
dynamicgraph::python::Interpreter
Definition:
interpreter.hh:22
python-compat.hh
api.hh
DYNAMIC_GRAPH_PYTHON_DEPRECATED
#define DYNAMIC_GRAPH_PYTHON_DEPRECATED
Definition:
deprecated.hh:32
include
dynamic-graph
python
interpreter.hh
Generated by
1.8.17