BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Functions | |
std::string | toString (PyObject *obj) |
std::vector< std::string > | toVectorString (PyObject *obj) |
std::string | toString (char *c) |
std::string | toString (wchar_t *c) |
void | import_bornagain (const std::string &path="") |
std::string | pythonRuntimeInfo () |
std::string | pythonStackTrace () |
std::string PyEmbeddedUtils::toString | ( | PyObject * | obj | ) |
Converts PyObject into string, if possible, or throws exception.
Definition at line 24 of file PyEmbeddedUtils.cpp.
Referenced by PyImport::listOfFunctions(), pythonRuntimeInfo(), and toVectorString().
std::vector< std::string > PyEmbeddedUtils::toVectorString | ( | PyObject * | obj | ) |
Converts PyObject into vector of strings, if possible, or throws exception.
Definition at line 38 of file PyEmbeddedUtils.cpp.
References toString().
Referenced by pythonRuntimeInfo().
std::string PyEmbeddedUtils::toString | ( | char * | c | ) |
Converts char to string. In the case of nullptr will return an empty string.
Definition at line 61 of file PyEmbeddedUtils.cpp.
std::string PyEmbeddedUtils::toString | ( | wchar_t * | c | ) |
Definition at line 69 of file PyEmbeddedUtils.cpp.
void PyEmbeddedUtils::import_bornagain | ( | const std::string & | path = "" | ) |
Imports BornAgain from given location. If path is empty, tries to rely on PYTHONPATH.
Definition at line 80 of file PyEmbeddedUtils.cpp.
Referenced by PyImport::createFromPython(), and PyImport::listOfFunctions().
std::string PyEmbeddedUtils::pythonRuntimeInfo | ( | ) |
Returns multi-line string representing PATH, PYTHONPATH, sys.path and other info.
Definition at line 109 of file PyEmbeddedUtils.cpp.
References SysUtils::getenv(), toString(), and toVectorString().
Referenced by pythonStackTrace().
std::string PyEmbeddedUtils::pythonStackTrace | ( | ) |
Returns string representing python stack trace.
Definition at line 142 of file PyEmbeddedUtils.cpp.
References pythonRuntimeInfo().
Referenced by anonymous_namespace{PyImport.cpp}::error_description().