Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Python - Estendere python: cos'è meglio?
Forum - Python - Estendere python: cos'è meglio?

Avatar
()
Newbie


Messaggi:
Iscritto:

Segnala al moderatore
Postato alle 1:00
Giovedì, 01/01/1970
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
Testo quotato


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:

Testo quotato


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


http://www.boost.org/doc/libs/1_35_0/libs/python/doc/index ...

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


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

PM Quote