29. Custom Python Interpreters — Python 2.7.18 documentation

This document is for an old version of Python that is no longer supported. You should upgrade and read the Python documentation for the current stable release.

# 29. Custom Python Interpreters

The modules described in this chapter allow writing interfaces similar to Python’s interactive interpreter. If you want a Python interpreter that supports some special feature in addition to the Python language, you should look at the `code` module. (The `codeop` module is lower-level, used to support compiling a possibly-incomplete chunk of Python code.)

The full list of modules described in this chapter is:

- 29.1. `code` — Interpreter base classes
  - 29.1.1. Interactive Interpreter Objects
  - 29.1.2. Interactive Console Objects
- 29.2. `codeop` — Compile Python code