On this page
  1. ctypes.Array
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

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

REPL Inspect

from ctypes import Array
help(Array)

Linked from

Related notes