Commit d80c0c34 authored by Florent Lamiraux's avatar Florent Lamiraux Committed by Florent Lamiraux florent@laas.fr
Browse files

Add an accessor to get the global dictionary.

parent a632d9a5
......@@ -49,6 +49,9 @@ namespace dynamicgraph {
/// \param stream input stream
std::string processStream(std::istream& stream, std::ostream& os);
/// \brief Return a pointer to the dictionary of global variables
PyObject* globals();
private:
/// Pointer to the dictionary of global variables
PyObject* globals_;
......
......@@ -98,6 +98,11 @@ std::string Interpreter::python( const std::string& command )
return value;
}
PyObject* Interpreter::globals()
{
return globals_;
}
void Interpreter::runPythonFile( std::string filename )
{
Py_Finalize();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment