File: ctypes_libc.py

package info (click to toggle)
python-ptrace 0.9.9-0.3
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 808 kB
  • sloc: python: 10,167; ansic: 263; makefile: 164
file content (11 lines) | stat: -rw-r--r-- 255 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
"""
Load the system C library. Variables:
 - LIBC_FILENAME: the C library filename
 - libc: the loaded library
"""

from ctypes import CDLL
from ctypes.util import find_library

LIBC_FILENAME = find_library('c')
libc = CDLL(LIBC_FILENAME, use_errno=True)