[Python-Dev] Re: Helpers for dynamic bytecode generation

2019-10-25 Thread Joe Jevnik via Python-Dev
I think this probably belongs on python-list instead of python-dev because python-dev is for development _of_ python, not _with_ python. To answer your question though, there are a few tools that do this: - https://github.com/vstinner/bytecode - https://github.com/ll/codetransformer I am

[Python-Dev] Re: Helpers for dynamic bytecode generation

2019-10-25 Thread Yonatan Zunger
@jjevnik -- Oops! I meant to send it there and sent it here by mistake. But thank you, everyone, for the recommendations! I'll check them all out and (mercifully) will probably not try to write this from scratch. On Thu, Oct 24, 2019 at 11:05 PM Brandt Bucher wrote: > Interesting that you bring

[Python-Dev] Re: Helpers for dynamic bytecode generation

2019-10-24 Thread Brandt Bucher
Interesting that you bring this up. Just earlier this week I published the first version of a new package that lets you write compiled bytecode instructions inline with pure-Python syntax. The code's still a bit messy, being only a week old and all, but it works as advertised for CPython 3.6.2

[Python-Dev] Re: Helpers for dynamic bytecode generation

2019-10-24 Thread Armin Rigo
Hi, On Fri, 25 Oct 2019 at 04:13, Jonathan Goble wrote: >> Has anyone already done this that people know of? (Searching the Internetz >> didn't turn anything up) Failing that, to what extent is it reasonable to >> either consider assemble() as some kind of sane API point into compile.c PyPy co

[Python-Dev] Re: Helpers for dynamic bytecode generation

2019-10-24 Thread Jonathan Goble
On Thu, Oct 24, 2019, 9:05 PM Yonatan Zunger wrote: > Hi everyone, > > Has anyone already done this that people know of? (Searching the > Internetz didn't turn anything up) Failing that, to what extent is it > reasonable to either consider assemble() as some kind of sane API point > into compile.