16 #error no need to expose this header to Swig 
   20 #ifndef BORNAGAIN_BASE_PY_PYUTILS_H 
   21 #define BORNAGAIN_BASE_PY_PYUTILS_H 
   23 #ifdef BORNAGAIN_PYTHON 
PyObvject forward declaration.
 
Our sample model: a stack of layers one below the other.
 
std::vector< std::string > toVectorString(PyObject *obj)
Converts PyObject into vector of strings, if possible, or throws exception.
 
PyObject * createNumpyArray(const std::vector< double > &data)
 
std::string toString(PyObject *obj)
Converts PyObject into string, if possible, or throws exception.
 
std::string pythonStackTrace()
Returns string representing python stack trace.
 
void import_bornagain(const std::string &path="")
Imports BornAgain from given location. If path is empty, tries to rely on PYTHONPATH.
 
std::string pythonRuntimeInfo()
Returns multi-line string representing PATH, PYTHONPATH, sys.path and other info.