2
---------------------------
6
The decorator module requires Python 2.4.
10
Copy the file decorator.py somewhere in your Python path.
5
:Author: Michele Simionato
6
:E-mail: michele.simionato@gmail.com
8
:Download page: http://pypi.python.org/pypi/decorator
9
:Installation: ``easy_install decorator``
15
If you are lazy, just perform
17
$ easy_install decorator
19
which will install just the module on your system. Notice that
20
Python 3 requires the easy_install version of the distribute_ project.
22
If you prefer to install the full distribution from source, including
23
the documentation, download the tarball_, unpack it and run
25
$ python setup.py install
27
in the main directory, possibly as superuser.
29
.. _tarball: http://pypi.python.org/pypi/decorator
30
.. _distribute: http://packages.python.org/distribute/
35
For Python 2.5, 2.6, 2.7 run
16
37
$ python documentation.py
18
This should work perfectly with Python 2.4 and Python 2.5 and give
19
minor errors with Python 2.6 (some inner details such as the
20
introduction of the ArgSpec namedtuple and Thread.__repr__ changed).
41
$ python documentation3.py
43
You will see a few innocuous errors with Python 2.5, because some
44
inner details such as the introduction of the ArgSpec namedtuple and
45
Thread.__repr__ changed. You may safely ignore them.
47
You cannot run the tests in Python 2.4, since there is a test using
48
the with statement, but the decorator module is expected to work
49
anyway (it has been used in production with Python 2.4 for years). My
50
plan is to keep supporting all Python versions >= 2.4 in the core
51
module, but I will keep the documentation and the tests updated only
52
for the latest Python versions in both the 2.X and 3.X branches.
54
Finally, notice that you may run into trouble if in your system there
55
is an older version of the decorator module; in such a case remove the
61
There are various versions of the documentation:
63
- `HTML version (Python 2)`_
64
- `PDF version (Python 2)`_
66
- `HTML version (Python 3)`_
67
- `PDF version (Python 3)`_
69
.. _HTML version (Python 2): http://micheles.googlecode.com/hg/decorator/documentation.html
70
.. _PDF version (Python 2): http://micheles.googlecode.com/hg/decorator/documentation.pdf
71
.. _HTML version (Python 3): http://micheles.googlecode.com/hg/decorator/documentation3.html
72
.. _PDF version (Python 3): http://micheles.googlecode.com/hg/decorator/documentation3.pdf