import ctypes

class FSSettings(object):
    def __init__(self, settings):
        self.settings = settings

class FS(object):
    def __init__(self):
        self.libfs = ctypes.cdll.LoadLibrary("libfluidsynth.so.1")
        self.settings = FSSettings(self.libfs.new_fluid_settings())
        self.synth = self.libfs.new_fluid_synth(self.settings.settings)

    def __del__(self):
        self.destroy()

    def destroy(self):
        self.libfs.delete_fluid_synth(self.synth)
        self.libfs.delete_fluid_settings(self.settings.settings)

@@ -6,16 +6,35 @@
 t ctypes
+%0Aimport ctypes.util
 %0A%0Aclass 
@@ -155,32 +155,148 @@
 __init__(self):%0A
+        path = ctypes.util.find_library(%22fluidsynth%22)%0A        print %22%5Bfs%5D Using '%25s' for FluidSynth library%22 %25 path%0A
         self.lib
@@ -328,28 +328,12 @@
 ary(
-%22libfluidsynth.so.1%22
+path
 )%0A  

Use find_library.