dis-cli

Display Python source code and bytecode side-by-side at the command line

dis-cli is a command line tool for displaying Python source and bytecode.

Installation

dis-cli can be installed from PyPI. To install via pip, run

$ pip install dis-cli

Usage

dis-cli provides a command line program, dis, which takes a "import-like" path to a function to display information about. For example, if you have a package a, with a submodule b, containing a function c, you could run dis on it like this:

$ dis a.b.c

Just like you could import c in a script:

import a.b.c

dis takes a few other options. Try running dis --help to see what's available!