On this page
ctypes.get_errno
Prev: ctypes.create_unicode_buffer | Up: ctypes | Next: ctypes.memmove
Rel: ctypes.addressof, ctypes.alignment, ctypes.ArgumentError, ctypes.Array
Ref: docs.python.org — ctypes.get_errno
Tags: #public #python3 #stdlib #ctypes
Import
import ctypes
from ctypes import get_errno
Signature & Overview
ctypes.get_errno()
ctypes.get_errno() function.
Usage
import ctypes
# Reads the thread-local ctypes errno copy (requires CDLL(..., use_errno=True))
assert isinstance(ctypes.get_errno(), int)
Gotchas
- Must open the library with
CDLL(path, use_errno=True): Otherwiseget_errno()won't capture the C call'serrno.
REPL Inspect
from ctypes import get_errno
help(get_errno)
Linked from
Related notes
- tuts/python3/stdlib_module/ctypes/create_unicode_buffer Linked here; links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/memmove Linked here; links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/ctypes/addressof Linked here; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/alignment Linked here; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/ArgumentError Linked here; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/Array Linked here; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/BigEndianStructure shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/BigEndianUnion shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/byref shared tags: #ctypes, #stdlib