--- __init__.py.orig 2014-08-14 22:17:11.000000000 +0200 +++ __init__.py 2015-03-10 21:54:25.000000000 +0100 @@ -1,4 +1,9 @@ -import sys,DLFCN -# This is needed to ensure that dynamic_cast and RTTI works inside kdelibs. -sys.setdlopenflags(DLFCN.RTLD_NOW|DLFCN.RTLD_GLOBAL) - \ No newline at end of file +import sys +try: + import DLFCN + # This is needed to ensure that dynamic_cast and RTTI works inside kdelibs. + sys.setdlopenflags(DLFCN.RTLD_NOW|DLFCN.RTLD_GLOBAL) +except: + from _ctypes import RTLD_GLOBAL + sys.setdlopenflags(RTLD_GLOBAL) +