VAPOR3 3.9.4
MyPython.h
Go to the documentation of this file.
1//
2// $Id$
3//
4
5#ifndef _MYPYTHON_h_
6#define _MYPYTHON_h_
7
8#include <vapor/MyBase.h>
9
10#if __clang__
11 #pragma clang diagnostic push
12 #pragma clang diagnostic ignored "-Wdeprecated-register"
13#else
14 #undef _POSIX_C_SOURCE
15 #undef _XOPEN_SOURCE
16#endif
17
18#ifdef WIN32
19 #ifdef _DEBUG
20 #undef _DEBUG
21 #include <Python.h>
22 #define _DEBUG
23 #else
24 #include <Python.h>
25 #endif
26#else
27 #include <Python.h>
28#endif
29
30#if __clang__
31 #pragma clang diagnostic pop
32#endif
33
34namespace Wasp {
35
36//
59//
61public:
63
64 static MyPython *Instance();
65
72 //
74
81 //
82 string PyErr();
83
85 //
86 string PyOut();
87
106 //
107 static PyObject *CreatePyFunc(string moduleName, string funcName, string script);
108
109private:
110 static MyPython * m_instance;
111 static bool m_isInitialized;
112 static std::string m_pyHome;
113
114 int pyImport(string lib);
115 int rerouteSTDIO();
116
117 MyPython() {} // Don't implement
118 MyPython(MyPython const &); // Don't Implement
119 void operator=(MyPython const &); // Don't implement
120};
121}; // namespace Wasp
122
123#endif
Wasp base class.
Definition: MyBase.h:67
string PyOut()
Return stdout message as a string.
static MyPython * Instance()
static PyObject * CreatePyFunc(string moduleName, string funcName, string script)
static bool IsRunningFromPython
Definition: MyPython.h:62
string PyErr()
#define RENDER_API
Definition: common.h:78
Definition: CFuncs.h:31