root/cly/trunk/cly/__init__.py

Revision 580, 1.6 kB (checked in by athomas, 1 month ago)

Removed reference to cly.extra.

Line 
1 # -*- coding: utf-8 -*-
2 #
3 # Copyright (C) 2006-2007 Alec Thomas <alec@swapoff.org>
4 #
5 # This software is licensed as described in the file COPYING, which
6 # you should have received as part of this distribution.
7 #
8
9 """CLY is a Python module for simplifying the creation of interactive shells.
10 Kind of like the builtin `cmd <http://docs.python.org/lib/module-cmd.html>`_
11 module on steroids.
12
13 It has the following features:
14
15   - Automatic tab completion of all commands::
16
17       cly> s<TAB><TAB>
18       show status
19
20   - Contextual help::
21
22       cly> <?>
23       show    Show information.
24       status  Display status summary.
25
26       login   Authenticate.
27
28       quit    Quit.
29
30   - Extensible grammar - define your own commands with full dynamic completion,
31     contextual help, and so on.
32
33   - :class:`XML grammar <cly.builder.XMLGrammar>` for building clean MVC style command line interfaces.
34
35   - Simple. Grammars are constructed from objects using a simple *functional*
36     style.
37
38   - Multiple grammars can be merged both statically and dynamically.
39
40   - Flexible command grouping and ordering.
41
42   - Grammar parser, including completion and help enumeration, can be used
43     independently of the readline-based shell. This allows CLY's parser to
44     be used in other environments (think "web-based shell" ;))
45 """
46
47
48 __docformat__ = 'restructuredtext en'
49 __author__ = 'Alec Thomas <alec@swapoff.org>'
50 try:
51     __version__ = __import__('pkg_resources').get_distribution('cly').version
52 except Exception:
53     pass
54
55
56 from cly.parser import *
57 from cly.builder import *
58 from cly.interactive import *
Note: See TracBrowser for help on using the browser.