Modified ctypes entry for clarity

This commit is contained in:
aaron
2015-11-01 08:41:27 -06:00
parent 599200c023
commit 7d0139a248
+12 -12
View File
@@ -5,18 +5,18 @@ Interfacing with C/C++ Libraries
ctypes
------
`ctypes <https://docs.python.org/3/library/ctypes.html>`_ is the de facto
library for interfacing with C/C++, and it provides not only full access to
the native C interface of most major operating systems (e.g., kernel32 on
Windows, or libc on *nix), but also provides support for loading and
interfacing with dynamic libraries, such as DLLs or shared objects at runtime.
It does bring along with it a whole host of types for interacting with system
APIs, and allows you to rather easily define your own complex types, such
as structs and unions, and allows you to modify things such as padding and
alignment, if needed. It can be a bit crufty to use, but in conjunction with
the `struct <https://docs.python.org/3.5/library/struct.html>`_ module, you
are essentially provided full control over how your data types get translated
into something usable by a pure C(++) method.
`ctypes <https://docs.python.org/3/library/ctypes.html>`_ is the CPython
included library for interfacing with C/C++, and it provides not only full
access to the native C interface of most major operating systems (e.g.,
kernel32 on Windows, or libc on *nix), but also provides support for loading
and interfacing with dynamic libraries, such as DLLs or shared objects at
runtime. It does bring along with it a whole host of types for interacting
with system APIs, and allows you to rather easily define your own complex
types, such as structs and unions, and allows you to modify things such as
padding and alignment, if needed. It can be a bit crufty to use, but in
conjunction with the `struct <https://docs.python.org/3.5/library/struct.html>`_
module, you are essentially provided full control over how your data types get
translated into something something usable by a C(++).
Struct Equivalents
~~~~~~~~~~~~~~~~~~