Skip to main content

Quickly open Python modules in your text editor.

Project description

pypi badge travis-ci status Code style: Black

Quickly open Python modules in your text editor.

$ ped django
$ ped django.core.urlresolvers
$ ped django.views.generic.TemplateView

# Partial name matching
$ ped django.http.resp
Editing django.http.response...

# Specify which editor to use
$ PED_EDITOR=vim ped django.shortcuts

ped will find your modules in the currently-active virtual environment.

Get it now

$ pip install ped

Changing the default editor

ped will try to use your favorite text editor. If you want to override the editor ped uses, set the PED_EDITOR environment variable.

# .zshrc or .bashrc
# Use Sublime Text with ped
export PED_EDITOR=subl


The ped package contains tab-completion scripts for bash and zsh. Place these files in your system’s completion directories. The ped.install_completion module can be run as a script to copy the files.

Bash completion

To install bash completion, run:

# The path given here will depend on your OS
$ python -m ped.install_completion --bash /usr/local/etc/bash_completion.d

Zsh completion

To install zsh completion, run:

# The path given here will depend on your OS
$ python -m ped.install_completion --zsh /usr/local/share/zsh/site-functions

Editor integrations


This was inspired by IPython’s %edit magic.


1.6.0 (2019-01-14)

  • Test against Python 3.7.

Note: This is the last version to support Python 2.


  • Minor code cleanups.
  • Test against Python 2.7, 3.5, and 3.6. Support for older versions is dropped.



  • Add --info argument for outputting name, file path, and line number of modules/functions/classes.
  • Fix: Support line numbers in gvim.


  • If a class or function is passed, the editor will open up the file at the correct line number (for supported editors).


  • Fix for Py2 compatibility.


  • Add partial name matching.


  • Add support for editing functions and classes.


  • Fix for editing subpackages, e.g. ped pkg.subpkg.

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
ped-1.6.0-py2.py3-none-any.whl (9.6 kB) Copy SHA256 hash SHA256 Wheel py2.py3
ped-1.6.0.tar.gz (10.6 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page