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
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 | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.