O'Reilly logo

Python: Essential Reference, Third Edition by David Beazley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

dl

The dl module provides access to the dynamic loader on UNIX platforms. There is rarely any need to use this module directly. However, the contents of this module may be of some use for programmers who work with C/C++ extensions to Python.

open(name [, mode])

Opens a shared object file, name, and returns a handle object. mode is the bitwise OR of flags that control how symbols are solved in the loaded library. Here are the common flag values:

Flag ValueDescription
RTLD_GLOBALExternal symbols in the loaded library added to the global namespace and used to resolve symbols in subsequently loaded libraries.
RTLD_LAZYUse late-binding of symbols.
RTLD_LOCALSymbols in the loaded library are private.
RTLD_NODELETEDo not remove the library from memory after ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required