-
Tiago Peixoto authored
It is now possible to run arbitrary "inline" C++ code from python, using scipy.weave, as such: g = graph_tool.Graph() g.load("foo.xml") value = 2.0 g.run_action('cout << num_vertices(g) << " " << value << endl;', ["value"]); The code gets compiled the first time, and is reused after that. Python local and global variables can be passed to C++, as shown above, by specifying a list of passed variables as the second argument.
866bb994