pyd.def

Contains utilities for wrapping D functions.

Members

Enums

PyInitOrdering
enum PyInitOrdering

Functions

add_module
void add_module()

Module initialization function. Should be called after the last call to def.

def
void def()

Wraps a D function, making it callable from Python.

module_init
PyObject* module_init(string docstring = "")

Module initialization function. Should be called after the last call to def. For extending python.

on_py_init
void on_py_init(void delegate() dg, PyInitOrdering ord = ModuleInit)

Use this to wrap calls to add_module and the like.

py_finish
void py_finish()

For embedding python, should you wish to restart the interpreter.

py_init
void py_init()

For embedding python

py_init
void py_init()

For embedding python

Static variables

Py_Finalize_called
auto Py_Finalize_called;

true after Py_Finalize has been called. Playing with the Python API when this is true is not advised.

Structs

Docstring
struct Docstring(string _doc)

Param of def, Def, StaticDef

Mode
struct Mode(string _mode)

Param of Property, Member

ModuleName
struct ModuleName(string _modulename)

Param of def

PyName
struct PyName(string _name)

Param of def, Def, StaticDef

Variables

ModuleInit
enum PyInitOrdering ModuleInit;

call will be made at the appropriate time for initializing modules. (for python 2, it should be after Py_Initialize, for python 3, before).

Meta