| ctypeslib(1) | User Commands | ctypeslib(1) |
NAME¶
h2xml - convert header files to XML intermediatesSYNOPSIS¶
h2xml includefile ... [options] -o outputxmlfileDESCRIPTION¶
ctypeslib is a Python code generator capable of converting C header files into xml files (using gccxml), and then converting the xmlfiles into Python modules which define a ctypes interface to the corresponding C library.h2xml header.h -o
out_c.xml
xml2py out_c.xml -o out_c.py
OPTIONS¶
h2xml options:- -h, --help
- show brief help message
-q,
--quiet
- -D NAME[=VALUE]
- macros to define
- -U NAME
- macros to undefine
- -I DIRECTORY
- additional include directories
- -o XMLFILE
- XML output filename
- -c, --cpp-symbols
- try to find #define symbols - this may give compiler errors, so it's off by default.
- -k
- don't delete the temporary files created (useful for finding problems)
- -h, --help
- show this help message and exit
- -c
- include source file location in comments
- -d
- include docstrings containing C prototype and source file location
- -k TYPEKIND
- kind of type descriptions to include: d = #defines, e = enumerations, f = functions, s = structures, t = typedefs
- -l DLLS
- libraries to search for exported functions
- -o OUTPUT
- output filename (if not specified, standard output will be used)
- -r EXPRESSION
- regular expression for symbols to include (if neither symbols nor expressions are specified,everything will be included)
- -s SYMBOL
- symbol to include (if neither symbols nor expressions are specified,everything will be included)
- -v
- verbose output
- -w
- add all standard windows dlls to the searched dlls list
- -m module
- Python module(s) containing symbols which will be imported instead of generated
- --preload=DLL
- dlls to be loaded before all others (to resolve symbols)
EXAMPLES¶
Please see /usr/share/doc/python-ctypeslib/examples.Debian for examples and explanation.SEE ALSO¶
/usr/share/doc/python-ctypeslib/examples.Debian contains a brief tutorial on some key featuresAUTHOR¶
ctypeslib was written by Thomas Heller <theller@ctypes.org>. This manual page was written by Richard Darst <rkd@zgib.net>, for the Debian project (and may be used by others).| March 2010 | ctypeslib |