Skip to content

Commit

Permalink
Renamed class and added a better README
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Sullivan committed Apr 17, 2016
1 parent 62589bc commit b7a2389
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
6 changes: 2 additions & 4 deletions example_functions.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#include <vector>
#include <iostream>
#include <string>
#include <pylab.hpp>
#include <error_handle.hpp>
#include <pylingual.hpp>

int main(){

try{

pylab py;

pylingual py;

py.import("pylab","plot");
py.import("pylab","savefig");
Expand Down
5 changes: 2 additions & 3 deletions example_variables.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#include <vector>
#include <iostream>
#include <string>
#include <pylab.hpp>
#include <error_handle.hpp>
#include <pylingual.hpp>

int main(){

try{

pylab py;
pylingual py;

py.import("pylab","plot");
py.import("pylab","savefig");
Expand Down
7 changes: 4 additions & 3 deletions include/pylab.hpp → include/pylingual.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
#include <boost/python.hpp>
#include <Python.h>
#include <converters.hpp>
#include <error_handle.hpp>

using namespace std;

class pylab {
class pylingual {
public:
pylab() {
pylingual() {
PyImport_AppendInittab("std", &initstd);
Py_Initialize();
// See PyImport_AppendInittab // BOOST_PYTHON_MODULE
Expand All @@ -27,7 +28,7 @@ class pylab {
built_in = boost::python::import("__builtin__");
modules["__builtin__"]=built_in;
}
~pylab() { ; }
~pylingual() { ; }

template<typename T>
boost::python::object VecToList(vector<T> _vec){
Expand Down

0 comments on commit b7a2389

Please sign in to comment.