<s> def _try_import_with_global_library_symbols ( ) : <EOL> try : <EOL> import DLFCN <EOL> dlopen_flags = DLFCN . RTLD_NOW | DLFCN . RTLD_GLOBAL <EOL> except ImportError : <EOL> import ctypes <EOL> dlopen_flags = ctypes . RTLD_GLOBAL <EOL> import sys <EOL> old_flags = sys . getdlopenflags ( ) <EOL> try : <EOL> sys . setdlopenflags ( dlopen_flags ) <EOL> import lupa . _lupa <EOL> finally : <EOL> sys . setdlopenflags ( old_flags ) <EOL> try : <EOL> _try_import_with_global_library_symbols ( ) <EOL> except : <EOL> pass <EOL> del _try_import_with_global_library_symbols <EOL> from lupa . _lupa import * <EOL> try : <EOL> from lupa . version import __version__ <EOL> except ImportError : <EOL> pass </s>
