|
|
// Return the named attribute object from the named module. | // Return the named attribute object from the named module. |
PyObject *PyCustomWidgets::getModuleAttr(const char *module, const char *attr) | PyObject *PyCustomWidgets::getModuleAttr(const char *module, const char *attr) |
{ | { |
#if PY_VERSION_HEX >= 0x020500 |
#if PY_VERSION_HEX >= 0x02050000 |
PyObject *mod = PyImport_ImportModule(module); | PyObject *mod = PyImport_ImportModule(module); |
#else | #else |
PyObject *mod = PyImport_ImportModule(const_cast<char *>(module)); | PyObject *mod = PyImport_ImportModule(const_cast<char *>(module)); |