On Wed, Jul 16, 2008 at 5:03 PM, nirinA raseliarison
<[EMAIL PROTECTED]> wrote:
> my initial motivation is to make these functions accessible,
> with just a few lines of additionnal code. that's so simple
> with a linux box!

As Daniel Stutzbach already hinted, the easiest way to just get at the
system gamma and error functions, in a platform-dependent manner,
is probably to use ctypes.  On OS X:

Macintosh-3:trunk dickinsm$ ./python.exe
Python 2.6b1+ (trunk:65004M, Jul 16 2008, 10:17:30)
[GCC 4.0.1 (Apple Inc. build 5484)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> tgamma = ctypes.CDLL('libm.dylib').tgamma
>>> tgamma.restype = ctypes.c_double
>>> tgamma.argtypes = [ctypes.c_double]
>>> tgamma(1.0)
1.0
>>> tgamma(6.1)
142.45194406567867

Is this enough for your immediate needs?

Mark
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to