On this page
ctypes.Array
Prev: ctypes.ArgumentError | Up: ctypes | Next: ctypes.BigEndianStructure
Rel: ctypes.addressof, ctypes.alignment, ctypes.ArgumentError, ctypes.BigEndianStructure
Ref: docs.python.org — ctypes.Array
Tags: #public #python3 #stdlib #ctypes
Import
import ctypes
from ctypes import Array
Signature & Overview
ctypes.Array(...)
Abstract base class for arrays.
Usage
import ctypes
Int3 = ctypes.c_int * 3
arr = Int3(10, 20, 30)
assert isinstance(arr, ctypes.Array) and list(arr) == [10, 20, 30]
Gotchas
- Create array types with
c_type * N: Fixed-size contiguous C memory compatible withmemoryview(arr).
REPL Inspect
from ctypes import Array
help(Array)
Linked from
- tuts/python3/stdlib_module/ctypes
- tuts/python3/stdlib_module/ctypes/addressof
- tuts/python3/stdlib_module/ctypes/alignment
- tuts/python3/stdlib_module/ctypes/ArgumentError
- tuts/python3/stdlib_module/ctypes/BigEndianStructure
- tuts/python3/stdlib_module/ctypes/BigEndianUnion
- tuts/python3/stdlib_module/ctypes/byref
- tuts/python3/stdlib_module/ctypes/c_bool
- tuts/python3/stdlib_module/ctypes/c_buffer
- tuts/python3/stdlib_module/ctypes/c_byte
- tuts/python3/stdlib_module/ctypes/c_char
- tuts/python3/stdlib_module/ctypes/c_char_p
- tuts/python3/stdlib_module/ctypes/c_double
- tuts/python3/stdlib_module/ctypes/c_double_complex
- tuts/python3/stdlib_module/ctypes/c_float
- tuts/python3/stdlib_module/ctypes/c_float_complex
- tuts/python3/stdlib_module/ctypes/c_int
- tuts/python3/stdlib_module/ctypes/c_int16
- tuts/python3/stdlib_module/ctypes/c_int32
- tuts/python3/stdlib_module/ctypes/c_int64
- tuts/python3/stdlib_module/ctypes/c_int8
- tuts/python3/stdlib_module/ctypes/c_long
- tuts/python3/stdlib_module/ctypes/c_longdouble
- tuts/python3/stdlib_module/ctypes/c_longdouble_complex
- tuts/python3/stdlib_module/ctypes/cast
- tuts/python3/stdlib_module/ctypes/create_string_buffer
- tuts/python3/stdlib_module/ctypes/create_unicode_buffer
- tuts/python3/stdlib_module/ctypes/get_errno
- tuts/python3/stdlib_module/ctypes/memmove
- tuts/python3/stdlib_module/ctypes/memoryview_at
- tuts/python3/stdlib_module/ctypes/memset
- tuts/python3/stdlib_module/ctypes/pointer
- tuts/python3/stdlib_module/ctypes/resize
- tuts/python3/stdlib_module/ctypes/set_errno
- tuts/python3/stdlib_module/ctypes/SetPointerType
- tuts/python3/stdlib_module/ctypes/sizeof
- tuts/python3/stdlib_module/ctypes/string_at
- tuts/python3/stdlib_module/ctypes/wstring_at
Related notes
- tuts/python3/stdlib_module/ctypes/addressof Linked here; links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/alignment Linked here; links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/ArgumentError Linked here; links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/BigEndianStructure 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/BigEndianUnion links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/byref links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/c_bool links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/c_buffer links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/c_byte links to this page; shared tags: #ctypes, #stdlib