Leonard,

Addendum: apparently, clang even provides python bindings.
http://eli.thegreenplace.net/2011/07/03/parsing-c-in-python-with-clang/

yes, but AFAIK it's C only and in any case, those are bindings to CLang,
rather than bindings to the code parsed from CLang. You'll run into the
same problems in their use from PyPy just as any other extension library,
and you'd still have to build up the bindings to user code from those
bindings to CLang (which is where the major work resides).

But: I showed the reflex library you're using to friends and they both
suggested clang to parse C++ headers instead. What do you think about
that?

As said in the mail and the docs: the medium term is to use Cling, which
is based on CLang. The difference is the C++ interactivity, which is a
better match for Python to allow build-up of callbacks and cross-language
inheritance.

We started out with Reflex b/c that was a known quantity. Also, for large
C++ libraries across many different projects (as we have to deal with),
there is nothing in CLang that allows you to cleanly pre-package reflection
info like is done with shared libraries in Reflex. For Cling, a method is
being developed based on pre-compiled headers.

Best regards,
           Wim
--
wlavrij...@lbl.gov    --    +1 (510) 486 6411    --    www.lavrijsen.net
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to