

Sometimes people use "the Python interpreter" more or less interchangeably with "Python" to talk about executing Python code from start to finish. Sometimes interpreter refers to the Python REPL, the interactive prompt you get by typing python at the command line.

The word "interpreter" can be used in a variety of different ways when discussing Python.

A Python Interpreterīefore we begin, let's narrow down what we mean by "a Python interpreter".

(If you don't know which Python you're using, it's probably CPython.) Despite its short length, Byterun is capable of running most simple Python programs 1. Its structure is similar to the primary implementation of Python, CPython, so understanding Byterun will help you understand interpreters in general and the CPython interpreter in particular. The goal is not to explain everything there is to know about interpreters-like so many interesting areas of programming and computer science, you could devote years to developing a deep understanding of the topic.īyterun was written by Ned Batchelder and myself, building on the work of Paul Swartz. This chapter will walk through the structure of the interpreter and give you enough context to explore it further. Through my work on Byterun, I was surprised and delighted to discover that the fundamental structure of the Python interpreter fits easily into the 500-line size restriction. Introductionīyterun is a Python interpreter implemented in Python. (This chapter is also available in Simplified Chinese). She's spoken at P圜on North America about Python internals and loves weird bugs. Before Dropbox, she was a facilitator at the Recurse Center, a writers retreat for programmers in New York. Research Software Engineering with Python,Īllison is an engineer at Dropbox, where she helps maintain one of the largest networks of Python clients in the world. Software Design by Example in JavaScript, If you enjoy these books, you may also enjoy
