Mapping a global variable from a shared library with ctypes

There’s a section in the ctypes docs about accessing values exported in dlls:

http://docs.python.org/library/ctypes.html#accessing-values-exported-from-dlls

e.g.

def pbs_errno():
    return c_int.in_dll(libtorque, "pbs_errno")

Leave a Comment