[pythran] Re: What can pythran functions call?

  • From: Neal Becker <ndbecker2@xxxxxxxxx>
  • To: pythran@xxxxxxxxxxxxx
  • Date: Wed, 27 Feb 2019 06:46:00 -0500

2. Are there any examples I can look at for pythran calling C/C++ functions?

On Wed, Feb 27, 2019 at 2:26 AM Serge Guelton <
serge.guelton@xxxxxxxxxxxxxxxxxxx> wrote:

On Tue, Feb 26, 2019 at 06:15:58PM -0500, Neal Becker wrote:
AFAIK, pythran functions can only call math functions known to pythran,
or
other pythran functions.
Questions:

1. Can pythran functions call ordinary python functions?

No. This would mean running interpreted code from native function. This is
technically possible but incompatible with the nogil assumption.

2. Can pythran functions call native C/C++ functions?

Sure, you just need to wrap it inside a capsule (cython and pythran can do
that)


Other related posts: