Command Line interface in pYthon
Overview
CLY is a Python module for simplifying the creation of interactive shells. Kind of like the builtin cmd module on steroids.
It has the following features:
- Tab completion of all commands.
- Contextual help.
- Extensible grammar - you can define your own commands with full dynamic completion, contextual help, and so on.
- Simple. Grammars are constructed from objects using a convenient function-like syntax.
- Grammars can also be defined in XML, facilitating a more data-driven approach.
- Flexible command grouping and ordering.
- Grammar parser, including completion and help enumeration, can be used independently of the readline-based shell. This allows CLY's parser to be used in other environments (think web-based shell ;))
- Lots of other cool stuff.
Bugs?
Please check existing bugs first in case your issue has already been reported.
If it hasn't proceed create a new ticket.
Installation
Normal Python package installation procedures apply:
# python setup.py build # python setup.py build_ext -i # python setup.py test # python setup.py install
This will compile, test and install CLY and the CLY Readline extensions.
Documentation
I suggest talking a walk through the tutorial first, then refer to the documentation index for more information.
Download
Latest stable versions can be downloaded from the Cheese Shop.
Download a ZIP of trunk from here, browse the code, or check out the source with Subversion:
svn co http://swapoff.org/svn/cly/trunk cly
Change Log
[604] by athomas on 03/05/09 17:54:54
Fix Base64 regex. Thanks Daniel. Fixes #102 (again).
[603] by athomas on 27/04/09 17:51:02
Add Base64 to all.
[602] by athomas on 27/04/09 17:36:04
Add BinASCII support. Fixes #102. Thanks dcooper@…!
[601] by athomas on 17/04/09 23:24:25
Renamed cprintstrip() to cstrip().
[600] by athomas on 17/04/09 14:11:50
Add support for console codes to the prompt.
[599] by athomas on 17/04/09 11:12:18
Doc cleanup.
