Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #21320 > unrolled thread
| Started by | Stefan Behnel <stefan_ml@behnel.de> |
|---|---|
| First post | 2012-03-07 15:52 +0100 |
| Last post | 2012-03-07 15:52 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Porting the 2-3 heap data-structure library from C to Python Stefan Behnel <stefan_ml@behnel.de> - 2012-03-07 15:52 +0100
| From | Stefan Behnel <stefan_ml@behnel.de> |
|---|---|
| Date | 2012-03-07 15:52 +0100 |
| Subject | Re: Porting the 2-3 heap data-structure library from C to Python |
| Message-ID | <mailman.470.1331131962.3037.python-list@python.org> |
Alec Taylor, 07.03.2012 15:25: > I am planning to port the 2-3 heap data-structure as described by > Professor Tadao Takaoka in Theory of 2-3 Heaps published in 1999 and > available in PDF: > http://www.cosc.canterbury.ac.nz/tad.takaoka/2-3heaps.pdf > > The source-code used has been made available: > http://www.cosc.canterbury.ac.nz/research/RG/alg/ttheap.h > http://www.cosc.canterbury.ac.nz/research/RG/alg/ttheap.c > > I plan on wrapping it in a class. > > This tutorial I used to just test out calling C within Python > (http://richizo.wordpress.com/2009/01/25/calling-c-functions-inside-python/) > and it seems to work, but this might not be the recommended method. > > Any best practices for how best to wrap the 2-3 heap data-structure > from C to Python? For data structures, where performance tends to matter, it's usually best to start with Cython right away, instead of using ctypes. http://cython.org/ Here's a tutorial for wrapping a C library with it: http://docs.cython.org/src/tutorial/clibraries.html Stefan
Back to top | Article view | comp.lang.python
csiph-web