BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
PyUtils.h File Reference

Description

Defines PyUtils namespace.

Homepage:\n http://www.bornagainproject.org
License:\n GNU General Public License v3 or higher (see COPYING)
Authors
Scientific Computing Group at MLZ (see CITATION, AUTHORS)

Definition in file PyUtils.h.

Include dependency graph for PyUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 BaseUtils
 
 BaseUtils::Python
 

Macros

#define BORNAGAIN_BASE_PY_PYUTILS_H
 

Functions

PyObjectBaseUtils::Python::createNumpyArray (const std::vector< double > &data)
 
PyObjectBaseUtils::Python::import_bornagain (const std::vector< std::string > &paths={})
 Imports BornAgain from given location. If path is empty, tries to rely on PYTHONPATH. More...
 
std::string BaseUtils::Python::pythonRuntimeInfo ()
 Returns multi-line string representing PATH, PYTHONPATH, sys.path and other info. More...
 
std::string BaseUtils::Python::pythonStackTrace ()
 Returns string representing python stack trace. More...
 
std::string BaseUtils::Python::toString (char *c)
 Converts char to string. In the case of nullptr will return an empty string. More...
 
std::string BaseUtils::Python::toString (PyObject *obj)
 Converts PyObject into string, if possible, or throws exception. More...
 
std::string BaseUtils::Python::toString (wchar_t *c)
 
std::vector< std::string > BaseUtils::Python::toVectorString (PyObject *obj)
 Converts PyObject into vector of strings, if possible, or throws exception. More...
 

Macro Definition Documentation

◆ BORNAGAIN_BASE_PY_PYUTILS_H

#define BORNAGAIN_BASE_PY_PYUTILS_H

Definition at line 21 of file PyUtils.h.