ctypesgen.py man page

ctypesgen.py — Automatically generate ctypes wrappers for C header files


Usage: ctypesgen.py [options] /path/to/header.h ...


-h, --help
show this help message and exit
-o FILE, --output=FILE
write wrapper to FILE [default stdout]
-l LIBRARY, --library=LIBRARY
link to LIBRARY
include system header HEADER (e.g. stdio.h or stdlib.h)
-m MODULE, --module=MODULE, --link-module=MODULE
use symbols from Python module MODULE
add INCLUDEDIR as a directory to search for headers
where OPTION is -L, -R, or --rpath
-L LIBDIR, -R LIBDIR, --rpath=LIBDIR, --libdir=LIBDIR
Add LIBDIR to the search path (both compile-time and run-time)
Add LIBDIR to the compile-time library search path.
Add LIBDIR to the run-time library search path.
The command to invoke the c preprocessor, including any necessary options (default: gcc -E)
Save the preprocessed headers to the specified FILENAME
-a, --all-headers
include symbols from all headers, including system headers
include symbols automatically generated by the preprocessor
Don't output macros.
regular expression for symbols to always include
regular expression for symbols to exclude
Do not support extra C types from stddef.h
Do not support extra GNU C types
Do not support extra C types built in to Python
Use TEMPLATE as the header template in the output file.
Strip build path from header paths in the wrapper file.
Add the contents of FILENAME to the end of the wrapper file.
Choose output language (`json' or `python' [default])
Display all warnings and errors even if they would not affect output.
Display long error messages instead of abbreviating error messages.
Do not print macro warnings.


June 2013 ctypesgen.py r147 User Commands