Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -49,6 +49,9 @@ namespace dynamicgraph { ...@@ -49,6 +49,9 @@ namespace dynamicgraph {
/// \param stream input stream /// \param stream input stream
std::string processStream(std::istream& stream, std::ostream& os); std::string processStream(std::istream& stream, std::ostream& os);
/// \brief Return a pointer to the dictionary of global variables
PyObject* globals();
private: private:
/// Pointer to the dictionary of global variables /// Pointer to the dictionary of global variables
PyObject* globals_; PyObject* globals_;
......
...@@ -98,6 +98,11 @@ std::string Interpreter::python( const std::string& command ) ...@@ -98,6 +98,11 @@ std::string Interpreter::python( const std::string& command )
return value; return value;
} }
PyObject* Interpreter::globals()
{
return globals_;
}
void Interpreter::runPythonFile( std::string filename ) void Interpreter::runPythonFile( std::string filename )
{ {
Py_Finalize(); Py_Finalize();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment