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.
Source Distribution
File details
Details for the file konch-0.1.0.tar.gz.
File metadata
- Download URL: konch-0.1.0.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28d57289c82aad0598d248756f0a75ac8ccbc793eb9423f213189a53e418ac73
|
|
| MD5 |
5061f21b62fa03b5140a729ccb0a6909
|
|
| BLAKE2b-256 |
c5106a6101896d4d1947940fef2f4d1e094f05ce4610cde63e1b9deaddfa855f
|