Anybody knows if actually exists a wrapper or ported library to access to Unix dynamic linker on Python?
+1
A:
The module is called dl:
>>> import dl
>>> dl.open("libfoo.so")
<dl.dl object at 0xb7f580c0>
>>> dl.open("libfoo.so").sym('bar')
1400432
... though it's nasty and you might want to consider using ctypes or an extension module.
Edit
Apparently, dl is deprecated in 2.6 so you'll want to use ctypes which has a better API anyhow.
Aaron Maenpaa
2009-03-09 20:12:31
deprecation of dl in favor of ctypes confirms that my near-guess of an answer was correct. *phew*.
Devin Jeanpierre
2009-03-09 20:16:45