libcap = ctypes.cdll.LoadLibrary('libcap.so')
cap_t = libcap.cap_get_file('/bin/ping')
libcap.cap_to_text.restype = ctypes.c_char_p
libcap.cap_to_text(cap_t, None)
How to read file capabilities using Python?