import ctypes
from ctypes.util import find_library

for __lib in ['ompl', 'ompl_app']:
	__libname = find_library(__lib)
	if __libname:
		ctypes.CDLL(__libname, ctypes.RTLD_GLOBAL)
	else:
		from platform import system
		from os.path import abspath, dirname
		__sys = system()
		if __sys=='Windows':
			__ext='.dll'
		elif __sys=='Darwin':
			__ext='.dylib'
		else: # Linux, other UNIX systems
			__ext='.so'
		ctypes.CDLL(
			dirname(abspath(__file__))+'/lib'+__lib+__ext,
			ctypes.RTLD_GLOBAL)

@@ -400,16 +400,24 @@
 t='.so'%0A
+%09%09try:%0A%09
 %09%09ctypes
@@ -423,16 +423,17 @@
 s.CDLL(%0A
+%09
 %09%09%09dirna
@@ -473,24 +473,25 @@
 b+__ext,%0A%09%09%09
+%09
 ctypes.RTLD_
@@ -478,28 +478,134 @@
 xt,%0A%09%09%09%09ctypes.RTLD_GLOBAL)%0A
+%09%09except:%0A%09%09%09# libompl_app doesn't necessarily exist%0A%09%09%09if __lib=='ompl_app':%0A%09%09%09%09pass%0A%09%09%09else:%0A%09%09%09%09raise%0A

make python module work without ompl_app