You are not logged in.
Pages: 1
http://starship.python.net/crew/theller/ctypes/
This is the greatest thing I've ever seen - look through the tutorial
Offline
is it like pyrex?
arch + gentoo + initng + python = enlisy
Offline
no.. it's a direct interface to C
libm = cdll("libm.so")
b = cdouble(20)
result = libm.cos(b)
that, while probably not right, will load libm.so and call cos from that lib... yeah that's not the greatest example in the world... but think of what you can do....
I may be wrong, but pyrex is more of a python extension.... whereas ctypes is actually written in python
Offline
no.. it's a direct interface to C
libm = cdll("libm.so")
b = cdouble(20)
result = libm.cos(b)that, while probably not right, will load libm.so and call cos from that lib... yeah that's not the greatest example in the world... but think of what you can do....
I may be wrong, but pyrex is more of a python extension.... whereas ctypes is actually written in python
*cough* , I have an PKGBUILD for it for a long time, since I hoped to get
rox-system working this way, but it failed. Anyway, here is the updated
PKGBUILD
# $Id$
# Contributor: Tobias Kieslich <tobias@justdreams.de>
pkgname=python-ctypes
_srcname=ctypes
pkgver=0.9.6
pkgrel=1
pkgdesc="package to manipulat C data types. Allows wrapping C-libs in Python"
url="http://starship.python.net/crew/theller/ctypes/"
depends=('python>=2.4')
source=(http://belnet.dl.sourceforge.net/sourceforge/$_srcname/$_srcname-$pkgver.tar.gz)
build() {
cd $startdir/src/$_srcname-$pkgver
python setup.py build
python setup.py install --root=$startdir/pkg
}
# vim: ft=sh ts=2
neri
Offline
Pages: 1