Skip to main content

Customizes your Python shell.

Project description

konch is a utility libary and command line interface for creating custom Python shells.

  • Automatically import any object upon startup
  • Per-project configuration
  • Compatible with IPython and BPython (automatically falls back to built-in interpreter)

Screencast

https://dl.dropboxusercontent.com/u/1693233/github/Screenshot%202014-03-14%2001.21.31.png

Get it now

$ pip install konch

Get started

Just use the konch command to run your interactive Python interpreter.

$ konch init
$ konch

To customize your shell environment, edit the .konchrc file created when you ran konch init.

.konchrc is just a regular Python file that calls the konch.config(config_dict) function.

You can pass any of the following options:

  • context: A dictionary of objects that will be available to you in your shell session.
  • shell: Default shell to use. May be konch.IPythonShell, konch.BPythonShell, konch.PythonShell, or konch.AutoShell (default).
  • banner: Custom banner text to show.

Here is an example .konchrc file that includes some functions from the requests library in its context.

import konch
import requests

konch.config({
    'context': {
        'httpget': requests.get,
        'httppost': requests.post,
        'httpput': requests.put,
        'httpdelete': requests.delete
    },
    'banner': 'A humanistic HTTP shell'
})

For more examples, see the example_rcfiles directory.

For more info on available command-line options, run konch --help.

Requirements

  • Python 2 or 3 (tested on 2.6, 2.7, 3.2, 3.3)

License

MIT licensed. See the bundled LICENSE file for more details.

Changelog

0.1.0 (2014-03-14)

  • First release to PyPI.

Project details


Release history Release notifications

History Node

2.4.0

History Node

2.3.0

History Node

2.2.1

History Node

2.2.0

History Node

2.1.0

History Node

2.0.0

History Node

1.1.2

History Node

1.1.1

History Node

1.1.0

History Node

1.0.0

History Node

0.4.2

History Node

0.4.1

History Node

0.4.0

History Node

0.3.4

History Node

0.3.3

History Node

0.3.2

History Node

0.3.1

History Node

0.3.0

History Node

0.2.0

This version
History Node

0.1.0

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
konch-0.1.0.tar.gz (12.0 kB) Copy SHA256 hash SHA256 Source None Mar 14, 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