On this page
ctypes.set_errno
Prev: ctypes.resize | Up: ctypes | Next: ctypes.SetPointerType
Rel: ctypes.addressof, ctypes.alignment, ctypes.ArgumentError, ctypes.Array
Ref: docs.python.org — ctypes.set_errno
Tags: #public #python3 #stdlib #ctypes
Import
import ctypes
from ctypes import set_errno
Signature & Overview
ctypes.set_errno(...)
ctypes.set_errno() function.
Usage
import ctypes
old = ctypes.set_errno(0)
assert isinstance(old, int)
Gotchas
- Reset to
0before calling a C function (withuse_errno=True) when checkingget_errno()afterward.
REPL Inspect
from ctypes import set_errno
help(set_errno)
Linked from
Related notes
- tuts/python3/stdlib_module/ctypes/resize Linked here; links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/SetPointerType 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