Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
dynamic-graph-python
Commits
d80c0c34
Commit
d80c0c34
authored
Feb 08, 2011
by
Florent Lamiraux
Committed by
Florent Lamiraux florent@laas.fr
Feb 08, 2011
Browse files
Add an accessor to get the global dictionary.
parent
a632d9a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/dynamic-graph/python/interpreter.hh
View file @
d80c0c34
...
...
@@ -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_
;
...
...
src/interpreter.cc
View file @
d80c0c34
...
...
@@ -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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment