Skip to main content

UNKNOWN

Project description

(WORK IN PROGRESS)

prompt_toolkit is a Library for building interactive command lines in Python.

It could be a replacement for readline. It’s Pure Python, and has some advanced features:

  • Syntax highlighting of the input while typing. (Usually with a Pygments lexer.)
  • Multiline input
  • Advanced code completion
  • Both Emacs and Vi keybindings (Similar to readline), including reverse and forward incremental search

The Python repl

Run ./bin/prompt-toolkit-python-repl to get an interactive Python prompt with syntaxt highlighting, code completion, etc…

Example

from prompt_toolkit import CommandLine
from prompt_toolkit.line import Exit

def main():
    # Create CommandLine instance
    cli = CommandLine()

    try:
        while True:
            code_obj = cli.read_input()
            print('You said: ' + code_obj.text)

    except Exit: # Quit on Ctrl-D keypress
        return

if __name__ == '__main__':
    main()

Project details


Release history Release notifications

History Node

1.0.15

History Node

1.0.14

History Node

1.0.13

History Node

1.0.10

History Node

1.0.9

History Node

1.0.8

History Node

1.0.7

History Node

1.0.6

History Node

1.0.5

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0.0

History Node

0.60

History Node

0.59

History Node

0.58

History Node

0.57

History Node

0.56

History Node

0.55

History Node

0.54

History Node

0.53

History Node

0.52

History Node

0.51

History Node

0.50

History Node

0.49

History Node

0.48

History Node

0.47

History Node

0.46

History Node

0.45

History Node

0.44

History Node

0.43

History Node

0.42

History Node

0.41

History Node

0.40

History Node

0.39

History Node

0.38

History Node

0.37

History Node

0.36

History Node

0.35

History Node

0.34

History Node

0.33

History Node

0.32

History Node

0.31

History Node

0.30

History Node

0.28

History Node

0.26

History Node

0.25

History Node

0.23

History Node

0.22

History Node

0.21

History Node

0.20

History Node

0.19

History Node

0.18

History Node

0.17

History Node

0.16

History Node

0.15

History Node

0.14

History Node

0.13

History Node

0.12

History Node

0.11

History Node

0.10

History Node

0.9

History Node

0.8

History Node

0.6

History Node

0.5

History Node

0.4

This version
History Node

0.3

History Node

0.2

History Node

0.1

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
prompt_toolkit-0.3.tar.gz (41.1 kB) Copy SHA256 hash SHA256 Source None Aug 26, 2014

Supported by

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