build_and_import_extension(modname, functions, *, prologue='', build_dir=None, include_dirs=[], more_init='')
Each fragment is a sequence of func_name, calling convention, snippet.
Code to preceed the rest, usually extra #include
or #define
macros.
Where to build the module, usually a temporary directory
Extra directories to find include files when compiling
Code to appear in the module PyMODINIT_FUNC
The module will have been loaded and is ready for use
Build and imports a c-extension module :None:None:`modname`
from a list of function fragments :None:None:`functions`
.
>>> functions = [("test_bytes", "METH_O", """ if ( !PyBytesCheck(args)) { Py_RETURN_FALSE; } Py_RETURN_TRUE; """)]This example is valid syntax, but we were not able to check execution
>>> mod = build_and_import_extension("testme", functions)See :
... assert not mod.test_bytes(u'abc')
... assert mod.test_bytes(b'abc')
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them