You should take a look at how pyperl does it. It uses a stub loader that python itself end up loading on 'import perl' and then this stub loader loads the real module with RTLD_GLOBAL. The stub loader is 'dlhack.c'. Get the source from http://downloads.activestate.com/Zope-Perl/pyperl-1.0.1.tar.gz -- Gisle Aas, ActiveState