Diff of /README [132ab2] .. [73803c]  Maximize  Restore

  Switch to unified view

a/README b/README
...
...
18
18
19
    http://pyke.sourceforge.net
19
    http://pyke.sourceforge.net
20
20
21
You can download a copy of this documentation to your hard drive:
21
You can download a copy of this documentation to your hard drive:
22
22
23
    pyke_doc_html-1.0.3.tar.gz
23
    pyke_doc_html-1.0.3.zip
24
24
25
See the end of this file for how to regenerate the html files.
25
See the end of this file for how to regenerate the html files.
26
26
27
27
28
INSTALLATION:
28
INSTALLATION:
29
29
30
Pyke requires python 2.5 (or later 2.x release).  Check with:
30
Pyke requires python 2.5 (or later).  Check with:
31
31
32
    $ python --version
32
    $ python --version
33
33
34
You can download this at:
34
You can download python at:
35
35
36
    http://www.python.org
36
    http://www.python.org
37
38
There is another branch of Pyke that is ready for Python3.x.  If you want
39
Python3.x support, read this:
40
41
    http://pyke.hg.sourceforge.net/hgweb/pyke/pre_2to3/file/8788b112f5f6/README-3.x
42
43
Otherwise (if you want Pyke on Python2.5 or later 2.x release)...
44
45
To install pyke with easy_install, at the shell prompt just type:
46
47
    $ easy_install pyke
48
49
If you don't have easy_install, you can install it by looking at:
50
51
    http://pypi.python.org/pypi/setuptools/
52
53
Then you've got two choices for pyke:
54
55
    pyke-1.0.3-py2.5.egg or pyke-1.0.3-py2.6.egg (used by easy_install)
56
 or the source distribution (see next section)
57
37
58
38
59
SOURCE DISTRIBUTION:
39
SOURCE DISTRIBUTION:
60
40
41
There is a separate set of Pyke sources for Python3.1.
42
61
The pyke source distribution is the file:
43
The pyke source distribution is the file:
62
44
63
    pyke-1.0.3.tar.gz
45
    pyke-1.0.3.zip
64
46
65
This contains the pyke source code, documentation (both source and html), and
47
This contains the pyke source code, documentation (both source and html), and
66
examples.
48
examples.
67
49
68
EXAMPLES:
50
EXAMPLES:
...
...
88
statements and return a plan to execute this SQL statement and return the
70
statements and return a plan to execute this SQL statement and return the
89
results as a dictionary.
71
results as a dictionary.
90
72
91
The web_framework example uses the sqlgen example.  This demonstrates the use
73
The web_framework example uses the sqlgen example.  This demonstrates the use
92
of multiple rule bases.  The web_framework is a WSGI application that uses the
74
of multiple rule bases.  The web_framework is a WSGI application that uses the
93
HTMLTemplate package (install this with "easy_install HTMLTemplate", be sure to
75
HTMLTemplate package (install this with "sudo easy_install HTMLTemplate", be
94
get version 1.5 or later).  It gets the column names from the HTMLTemplate and
76
sure to get version 1.5 or later).  It gets the column names from the
95
feeds those to the sqlgen example to generate a plan to retrieve the data.  It
77
HTMLTemplate and feeds those to the sqlgen example to generate a plan to
96
then builds a plan to populate the template and return the finished HTML
78
retrieve the data.  It then builds a plan to populate the template and return
97
document.  It also caches the plans so that they don't have to be re-generated
79
the finished HTML document.  It also caches the plans so that they don't have
98
for each request.  This makes it run a full 10 times faster than the same
80
to be re-generated for each request.  This makes it run a full 10 times faster
99
example done in TurboGears 2!  The example includes a wsgiref simple_server
81
than the same example done in TurboGears 2!  The example includes a wsgiref
100
setup to run it as an http server so that you can access it through your
82
simple_server setup to run it as an http server so that you can access it
101
browser.
83
through your browser.
102
84
103
The learn_pyke example is an incomplete attempt at a computer based training
85
The learn_pyke example is an incomplete attempt at a computer based training
104
program.  It only deals with the topic of pattern matching.  It is left here
86
program.  It only deals with the topic of pattern matching.  It is left here
105
as an example of using question bases.
87
as an example of using question bases.
106
88
...
...
130
    $ ./testall
112
    $ ./testall
131
113
132
to distinguish it from the "testall" program installed with doctest-tools.
114
to distinguish it from the "testall" program installed with doctest-tools.
133
115
134
116
117
WORKING WITH THE SOURCE CODE REPOSITORY:
118
119
If you want to run Python3.1, read this:
120
121
    http://pyke.hg.sourceforge.net/hgweb/pyke/pre_2to3/file/8788b112f5f6/README-3.x
122
135
COMPILING kfbparser_tables.py, krbparser_tables.py and scanner_tables.py:
123
COMPILING kfbparser_tables.py, krbparser_tables.py and scanner_tables.py:
136
124
137
    $ python
125
    $ python
138
    >>> from pyke.krb_compiler import kfbparser, krbparser, scanner
126
    >>> from pyke.krb_compiler import kfbparser, krbparser, scanner
139
    >>> scanner.init(scanner, 0, True)
127
    >>> scanner.init(scanner, 0, True)
...
...
159
147
160
To compile the documentation into html, you'll need docutils and rest2web.
148
To compile the documentation into html, you'll need docutils and rest2web.
161
If you're running linux, your distro may have packages for these already.
149
If you're running linux, your distro may have packages for these already.
162
Or you can:
150
Or you can:
163
151
164
    $ easy_install rest2web
152
    $ sudo easy_install rest2web
165
153
166
I used version 0.4.1 of docutils and 0.5.0 of rest2web.  I don't know if
154
I used version 0.4.1 of docutils and 0.5.0 of rest2web.  I don't know if
167
earlier versions work OK or not.
155
earlier versions work OK or not.
168
156
169
To check your versions:
157
To check your versions: