strange error with dynamic loading of sound extension - dlopen flags

Johannes Nix jnix at cafeconleche.de
Mon Feb 18 02:18:17 CET 2002


The cause of the problem is indeed the environment of dlopen(),
and the solution is as following (thanks to Kai Vehmanen):

-------------
import sys
import DLFCN                            # has to go before ALSA module
sys.setdlopenflags(DLFCN.RTLD_LAZY      # has to go before ALSA module
                   |DLFCN.RTLD_GLOBAL)  # has to go before ALSA module
from pcm import *                       # ALSA module

-------------

Johannes



More information about the Python-list mailing list