root/livinglogic.python.xist/INSTALL.rst @ 3118:315958681f42

Revision 3118:315958681f42, 2.7 KB (checked in by Walter Doerwald <walter@…>, 12 years ago)

Added ReST version of INSTALL.xml.

Line 
1Requirements
2============
3
4To use XIST you need the following software packages:
5
6    1.  `Python 2.5`_;
7
8    2.  `ll-core`_ (version 1.11 or newer);
9
10    3.  `Python Imaging Library`_;
11
12    4.  `libxml2`_ and its Python wrapper (if you want to parse "broken" HTML);
13
14    5.  `elinks`_ (if you want want to use the function
15        :func:`ll.xist.ns.html.astext`);
16
17    6.  `setuptools`_ (if you want to install this package as an egg);
18
19    7.  `py.test`_ (if you want to run the test suite)
20
21    8.  and a C compiler supported by distutils, if you want to install the source
22        distribution.
23
24    .. _Python 2.5: http://www.python.org/
25    .. _ll-core: http://www.livinglogic.de/Python/core
26    .. _Python Imaging Library: http://www.pythonware.com/products/pil/
27    .. _libxml2: http://www.xmlsoft.org/
28    .. _elinks: http://elinks.or.cz/
29    .. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools
30    .. _py.test: http://codespeak.net/py/current/doc/test.html
31
32
33Installation
34============
35
36setuptools is used for installation so you can install this module with the
37following command::
38
39    $ easy_install ll-xist
40
41If you want to install from source, you can download one of the
42`distribution archives`__, unpack it, enter the directory and execute the
43following command::
44
45    $ python setup.py install
46
47__ http://www.livinglogic.de/xist/Download.html
48
49This will copy ``*.py`` files, compile ``*.c`` files and install everything in
50the ``site-packages`` directory as the :mod:`ll.xist` package.
51
52<par>For Windows a binary distribution is provided. To install it,
53double click it, and follow the instructions.
54
55If you have difficulties installing this software, send a problem report
56to Walter Dörwald (walter@livinglogic.de).
57
58
59Character encoding
60==================
61
62When you pass an 8bit string in the constructor of an XIST element, these
63strings have to be converted to Unicode. XIST assumes that these 8bit strings
64are in the system default encoding, which normally is ASCII.
65
66If your strings contain non-ASCII characters you *must* pass them as unicode
67strings to the XIST constructors and you *must* specify the encoding you're
68using in your source code in the first or second line of your script (see
69:pep:`263` for a detailed description).
70
71
72IPython display hooks
73=====================
74
75If you're using XIST in an `IPython`_ shell, XIST allows you to browse through
76your trees using any of the browsers provided by IPython's `ipipe module`_.
77
78    .. _IPython: http://ipython.scipy.org/
79    .. _ipipe module: http://projects.scipy.org/ipython/ipython/wiki/UsingIPipe
80
81You can specify which format gets used by changing the value of the
82``defaultpresenter`` variable in the module :mod:`ll.xist.presenters`::
83
84    from ll.xist import presenters
85    presenters.defaultpresenter = presenters.TreePresenter
86
87Setting this value to ``None`` turns off the display hook.
Note: See TracBrowser for help on using the browser.