Oppure

Loading
25/08/11 20:03
Salve a tutti:
vorrei scrivere una libreria in c/c++ da importare in python per un progetto dove voglio la velocità di c++ ma con la semplicità di python:
ho cercato un po', ma non so cosa sia meglio:

1)cython legge direttamente le librerie c++ e permette di chiamare funzioni c/c++ come funzioni python
Cython is a programming language to simplify writing C and C++ extension modules for the CPython Python runtime. Strictly speaking, Cython syntax is a superset of Python syntax additionally supporting:

- Direct calling of C functions, or C++ functions/methods, from Cython code.
- Strong typing of Cython variables, classes, and class attributes as C types.


2) BOOST:
libreria di python, posto direttamente ciò che c'è sul sito:

Welcome to version 2 of Boost.Python, a C++ library which enables seamless interoperability between C++ and the Python programming language. The new version has been rewritten from the ground up, with a more convenient and flexible interface, and many new capabilities, including support for:

References and Pointers
Globally Registered Type Coercions
Automatic Cross-Module Type Conversions
Efficient Function Overloading
C++ to Python Exception Translation
Default Arguments
Keyword Arguments
Manipulating Python objects in C++
Exporting C++ Iterators as Python Iterators
Documentation Strings

boost.org/doc/libs/1_35_0/libs/python/doc/…

3)distutils: metodo build-in di python, che però credo serva solo a creare il file setup.py ecc ecc...
docs.python.it/html/lib/…


ciò che ho letto è molto confuso, quindi vorrei pareri e alternative da chi ha già fatto cose di questo tipo!
grazie dell'attenzione!