Tools and Process
What Is an Interpreter?
An interpreter runs a program by reading and executing its code directly, statement by statement, instead of producing an executable first.
Definition
An interpreter is a program that executes source code directly. Instead of producing an executable file in advance, it reads your code and carries out each statement as it goes.
Python, JavaScript, Ruby and PHP are usually run by interpreters, which is why you can type a line into a Python shell and see the result immediately.
How it works
Most modern interpreters first turn the code into bytecode, then run that bytecode in a virtual machine. CPython does this and caches the bytecode in .pyc files.
A mistake in a line that never runs can go unnoticed until that line executes, which is why tests matter more in interpreted languages.