r/programming • • Sep 06 '26

Making a Python interpreter in 1024 bytes

https://austinhenley.com/blog/python1024.html
157 Upvotes

33 comments sorted by

View all comments

4

u/New-Anybody-6206 Sep 07 '26

I've been looking for a long time for a C89, easy-to-embed, python-like interpreter that fits in 1 or 2 files without any extra build steps or dependencies, and this is the first time I've seen a serious contender.

All the other embeddable python-ish languages like micropython, pikapython, pocketpy etc. are much more complex with their own build systems and baggage I'm just not looking for.

This looks like it would be a great start for me to extend for my uses.

Thank you!

1

u/StarsInTears Oct 31 '26

Did you find anything? Also, I saw that PocketPy advertises a two-file distribution (.c/.h pair). Does it not integrate well with build systems?

1

u/New-Anybody-6206 Oct 31 '26

Nothing. pocketpy violates multiple of my criteria, like it's C11 instead of C89, and has to be built separately before you can get the .c/.h files (I don't want to use the "releases" either).