Skip to content

Comment on Embedding PyPy in a C applicationparent

Comments

Scripting apis are a possible use too.

Yes indeed, and using this approach you can also write Python plugins for other applications if they don't have Python scripting support already.

In the article, after the pypy plugin.py step that produced the C library, one could presumably dlopen the library to accomplish a dynamic plugin feature. Is there a way to invoke pypy to JIT this code to avoid invoking pypy and a compiler?

The way I understand it is that on first invocation of a function exported in the library this function will spin up a regular PyPy interpreter, which does JIT in exactly the same way as a normal invocation of PyPy would.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.