On this page
ctypes.c_char
Prev: ctypes.c_byte | Up: ctypes | Next: ctypes.c_char_p
Rel: ctypes.addressof, ctypes.alignment, ctypes.ArgumentError, ctypes.Array
Ref: docs.python.org — ctypes.c_char
Tags: #public #python3 #stdlib #ctypes
Import
import ctypes
from ctypes import c_char
Signature & Overview
ctypes.c_char(...)
ctypes.c_char class.
Usage
import ctypes
c = ctypes.c_char(b"A")
assert c.value == b"A"
Gotchas
- Expects a 1-byte
bytesobject (orint), not astr.
REPL Inspect
from ctypes import c_char
help(c_char)
Linked from
Related notes
- tuts/python3/stdlib_module/ctypes/c_byte Linked here; links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/c_char_p 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