Skip to content
Laeeth Isharc edited this page Mar 19, 2015 · 2 revisions

Table of Contents

Pyd

Pyd is a library for the D programming language that wraps the raw Python/C API with a cleaner, simpler interface. It makes exposing raw D functions and classes to Python almost trivially simple. It bears certain similarities to Boost.Python, and indeed Boost.Python is a major influence on Pyd.

Please note that the documents are in draft stage - see bitbucket or readthedocs for more finished versions that may nonetheless be somewhat out of date.

Reference

Extending Python with D

Embedding Python in D

CeleriD

Type Conversion

Advanced Type Conversion

Function Wrapping

Class Wrapping

Inheritance

Struct Wrapping

Exception Wrapping

PydObject

Installation

TODO

Status

Pyd is currently being developed on Fedora Linux. Its targets are D2 and Python 2.4 through 2.7. It requires DMD FE 2.060 or later.

| | Python 2.4 | Python 2.5 | Python 2.6 | Python 2.7 | Windows/dmd | ? | ? | ✓ | ✓ | Linux/dmd | ? | ? | ? | ✓* | Linux/ldc | ? | ? | ? | ✓ | Linux/gdc | ? | ? | ? | ?

    • extending python**
  • Building extension libraries is fundamentally limited by the fact that druntime does not support shared libraries. That being said, it is possible to get python extensions out of D compilers.
  • Linux: Extension libraries are nominally working on LDC. Loading multiple extension libraries is not working. Unittests and module constructors/destructors outside of phobos are not being run.
  • Extension libraries are working well on Windows with DMD.
    • embedding python** works decently with DMD, LDC. GDC status unknown.

Licensing

MIT

Credits

Pyd

>Kirk McDonald

CeleriD

>David Rushby, Kirk McDonald

Python/D Bindings

>Deja Augustine, David Rushby, Kirk McDonald

meta.Nameof,meta.Demangle

>copyright © 2005-2006 Don Clugston.

multi_index

>Ellery Newcomer

Special thanks to Tomasz Stachowiak and Daniel Keep for providing now-defunct metaprogramming modules which were vital to the early development of Pyd.

Clone this wiki locally