18 #include <gsl/gsl_errno.h>
20 #include <boost/python.hpp>
26 #define PYOPAL_GLOBALS_C
30 void errorHandlerGSL(
const char *
reason,
35 if (line || gsl_errno) {;}
43 while (argv[i] !=
nullptr) {
44 std::cerr << i <<
" " << std::string(argv[i]) <<
std::endl;
51 if (
ippl ==
nullptr) {
52 PyObject* pyargv = PySys_GetObject(
"argv");
53 boost::python::handle<> wrapper(boost::python::borrowed(pyargv));
54 boost::python::list myList(wrapper);
56 int argc = int(boost::python::len(myList));
61 argvr[0] =
new char[7];
62 strcpy(argvr[0],
"pyopal");
63 for (
int i = 1; i < argc; ++i) {
64 int stringLength(boost::python::len(myList[i]));
65 const char* value = boost::python::extract<const char*>(
66 boost::python::str(myList[i]));
67 argvr[i] =
new char[stringLength+1];
68 strcpy(argvr[i], value);
70 argvr[argc] =
nullptr;
77 if (
gmsg ==
nullptr) {
82 gsl_set_error_handler(&errorHandlerGSL);
void printArgv(char **argv)
Inform & endl(Inform &inf)
c Accompany it with the information you received as to the offer to distribute corresponding source complete source code means all the source code for all modules it plus any associated interface definition plus the scripts used to control compilation and installation of the executable as a special the source code distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable If distribution of executable or object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place counts as distribution of the source even though third parties are not compelled to copy the source along with the object code You may not or distribute the Program except as expressly provided under this License Any attempt otherwise to sublicense or distribute the Program is and will automatically terminate your rights under this License parties who have received or from you under this License will not have their licenses terminated so long as such parties remain in full compliance You are not required to accept this since you have not signed it nothing else grants you permission to modify or distribute the Program or its derivative works These actions are prohibited by law if you do not accept this License by modifying or distributing the you indicate your acceptance of this License to do and all its terms and conditions for distributing or modifying the Program or works based on it Each time you redistribute the the recipient automatically receives a license from the original licensor to distribute or modify the Program subject to these terms and conditions You may not impose any further restrictions on the recipients exercise of the rights granted herein You are not responsible for enforcing compliance by third parties to this License as a consequence of a court judgment or allegation of patent infringement or for any other reason(not limited to patent issues)
The base class for all OPAL exceptions.
static void instantiateGlobals()