Skip to main content

Interactive Python code editor with inline execution results

Project description

pdit

Output-focused Python editor.

pdit lets you write regular Python files and see execution results inline, like a notebook but without cells. Edit in your browser or your favorite editor.

Quick Start

pip install pdit
pdit --demo
pdit script.py

Features

  • Output-focused - Results appear inline next to the code that generated them
  • Just Python scripts - No notebooks, no cells, no special format. Work with plain .py files
  • File watching - Changes to the file on disk automatically reload in the editor
  • Auto-run - Execute code automatically when the file changes
  • Coding agents - Perfect companion for Claude Code, Cursor, and other AI coding tools that edit files

Rich Output

  • IPython display - Rich outputs via IPython.display
  • Matplotlib - Inline plot rendering
  • Interactive DataFrames - Sortable, searchable tables
  • Markdown - Format text output with Markdown

Output

Markdown

Top-level string output renders as Markdown, so headings, lists, and emphasis display cleanly.

HTML

Rich HTML output is supported for objects that implement _repr_html_(); see note: IPython.display.display.

IPython display

IPython display objects render inline; see IPython.display for details.

DataFrames

Pandas and Polars DataFrames render as interactive tables automatically.

Plots

Matplotlib figures display inline. Call plt.show(). To avoid every plt.* call emitting a plot, wrap plot creation in with plt.ioff(): and call plt.show() when you're ready.

import matplotlib.pyplot as plt

with plt.ioff():
    plt.figure()
    plt.plot(x, y)
    plt.show()

Installation

For development installs or running from source, use uv.

# Install from PyPI
uv add pdit

# Or use directly with uvx
uvx pdit script.py

# From cloned repo (for development)
git clone git@github.com:vangberg/pdit.git
cd pdit
uv pip install -e .
uv run pdit script.py

Usage

Start pdit with a Python file:

pdit script.py

This will:

  1. Start the local server on port 8888
  2. Open your browser automatically
  3. Load the script file in the editor

If you're running from source, use:

uv run pdit script.py

Options

pdit [OPTIONS] [SCRIPT]

Options:
  --demo             Open the bundled demo script
  --port INTEGER      Port to run server on (default: 8888)
  --host TEXT         Host to bind to (default: 127.0.0.1)
  --no-browser        Don't open browser automatically
  --help              Show help message

Examples

# Start with script
pdit analysis.py

# Start with the bundled demo script
pdit --demo

# Custom port
pdit --port 9000 script.py

# Start without opening browser
pdit --no-browser script.py

# Just start the editor (no script)
pdit

Development

See DEVELOPMENT.md for development setup and testing.

License

Private

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdit-0.2.0.tar.gz (394.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdit-0.2.0-py3-none-any.whl (387.5 kB view details)

Uploaded Python 3

File details

Details for the file pdit-0.2.0.tar.gz.

File metadata

  • Download URL: pdit-0.2.0.tar.gz
  • Upload date:
  • Size: 394.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pdit-0.2.0.tar.gz
Algorithm Hash digest
SHA256 905e2f58d4a5dfd15c728e471db9bc60621a0ebe116f6f7b6e5b5a9bca9729a4
MD5 6fcc95dfb5325e65b65195c2bfb7e0ea
BLAKE2b-256 376dffa9e0b1d3615b7d74a5e1b911e883855c2b85b2f04983c894d1b93f786c

See more details on using hashes here.

File details

Details for the file pdit-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pdit-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 387.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pdit-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 259e513ea7262e93666899948c891342d9ecec52e8f4e1bc32062f9beaa699d8
MD5 be629aaf04ac9d8466850de8cfa28634
BLAKE2b-256 8d91dbb87950488454c28950f5d4a70f1a94fb3a54b3c26b3bed9e4d1050d8d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page