pyd.def

Contains utilities for wrapping D functions.

Members

Enums

PyInitOrdering
enum PyInitOrdering

Functions

Py_Finalize_hook
void Py_Finalize_hook()
Undocumented in source. Be warned that the author may not have intended to support it.
Pyd_Module_p
PyObject* Pyd_Module_p(string modulename)
Undocumented in source. Be warned that the author may not have intended to support it.
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.

defer_class_wrap
void defer_class_wrap(string modulename, string classname, void delegate() wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
doActions
void doActions(PyInitOrdering which)
Undocumented in source. Be warned that the author may not have intended to support it.
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)

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

should_defer_class_wrap
bool should_defer_class_wrap(string modulename, string classname)
Undocumented in source. Be warned that the author may not have intended to support it.

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

Args
struct Args(string default_modulename, string default_docstring, string default_pyname, string default_mode, Params...)
Undocumented in source.
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

Templates

IsDocstring
template IsDocstring(T...)
Undocumented in source.
IsEponymousTemplateFunction
template IsEponymousTemplateFunction(alias fn)
Undocumented in source.
IsMode
template IsMode(T...)
Undocumented in source.
IsModuleName
template IsModuleName(T...)
Undocumented in source.
IsPyName
template IsPyName(T...)
Undocumented in source.
Py3_ModuleInit
template Py3_ModuleInit(string modulename)
Undocumented in source.
Typeof
template Typeof(alias fn0)
Undocumented in source.
alias_selector
template alias_selector(alias fn, fn_t)
Undocumented in source.
def_selector
template def_selector(alias fn, fn_t)
Undocumented in source.

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).

ModuleInit
enum PyInitOrdering ModuleInit;
Undocumented in source.
after_py_init_deferred_actions
void delegate()[] after_py_init_deferred_actions;
Undocumented in source.
before_py_init_deferred_actions
void delegate()[] before_py_init_deferred_actions;
Undocumented in source.
py_init_called
bool py_init_called;
Undocumented in source.
pyd_module_name
string pyd_module_name;
Undocumented in source.
pyd_modules
PyObject*[string] pyd_modules;
Undocumented in source.

Meta