Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A wrapper around Python's readline module which makes it easy to have an arbitrary number of 'inputs', each with its own history

Project Description


A wrapper around Python's readline module which makes it easy to have
an arbitrary number of "inputs", each with its own history

Basic Usage

import multireadline as mrl

m = mrl.Multireadline()


while True:

Each of the three calls to `get()` will have their own history,
tab-completion lists, and prompts, which will be shown by letting the
loop run for several iterations.

Calls to `add_readline()` may raise exceptions (see below).

See the Tutorial for more information on usage.

### _Nota Bene_

Since `multireadline` is built atop the standard Python bindings for
readline, it does not handle spaces in inputs well. As a workaround,
the internal input list substitutes another character (by default, a
caret) anywhere that a space occurs. So if I enter

`band> Three Dog Night`

then, while my program would get `Three Dog Night` as my input, the
readline history would store`Three^Dog^Night`. This workaround lets
tab-completion work "the right way".

This is an unbeautiful, ungraceful hack, but I'd rather have that (and
working code) than spend several weeks digging into the innards of
readline (without working code).


* `AttributeMissingError` - raised when `name` (or other required
attribute) is not included in a call.

* `IdMissError` - Raised when a name lookup fails

* `IdCollisionError` - Raised when a specified name conflicts with an existing (unique) name

* `ArgConflictError` - Raised when incompatible/impossible argument combinations are given

Release History

This version
History Node


History Node


History Node


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
(6.2 kB) Copy SHA256 Hash SHA256
Source None Nov 10, 2012

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers