How to browse a C Library with Python
georg.heiss
georg.heiss at gmx.de
Wed Dec 5 10:32:31 EST 2007
Hello,
with Python it is simple to call direct functions from c-librarys.
Is there a way to browse over a library i.e. '/lib/libc.so' with
python, to see all possible functions in a library?
#!/python
import dl, time
i = 1
line = "Python ist geil, weil ich direkt auf C librarys zugreifen kann!
\n"
print line
a = dl.open('/lib/libc.so')
print 'call c-function direct from /lib/libc.so'
i = a.call('time')
print i
print 'call function from python'
i = time.time()
print i
#########################################################
Regards
Georg
More information about the Python-list
mailing list