Requirements and installation ============================= Requirements ============ To use XIST you need the following software packages: 1. Python 2.4, 2. The Python XML package (at least version 0.8.4), 3. ll-core (1.7.1 or newer), 4. if you want to use automatic image size calculation: the Python Imaging Library, 5. if you want to parse broken HTML: libxml2 (including its Python wrapper), 6. if you want want to use the function ll.xist.ns.html.astext to convert HTML to plain text: elinks, 7. if you want to install this package as an egg: setuptools. 8. if you want to run the test suite: py.test, 9. and a C compiler supported by distutils, if you want to install the source distribution. Installation ============ setuptools is used for installation so you can install this module with the following command: easy_install ll-xist If you want to install from source, you can download one of the distribution archives, unpack it, enter the directory and execute the following command: python setup.py install This will copy *.py files, compile *.c files and install everything in the site-packages directory as the ll.xist package. For Windows a binary distribution is provided. To install it, double click it, and follow the instructions. If you have difficulties installing this software, send a problem report to Walter Dörwald (walter@livinglogic.de). Character encoding ================== When you pass an 8bit string in the constructor of an XIST element, these strings have to be converted to Unicode. XIST assumes that these 8bit strings are in the system default encoding, which normally is ASCII. If your strings contain non-ASCII characters you must pass them as unicode strings to the XIST constructors and you must specify the encoding you're using in your source code in the first or second line of your script (see PEP 263 for a detailed description). IPython display hooks ===================== If you're using XIST in an IPython shell, XIST allows you to browse through your trees using any of the browsers provided by IPython's ipipe module. You can specify which format gets used by changing the value of the defaultpresenter variable in the module ll.xist.presenters: from ll.xist import presenters presenters.defaultpresenter = presenters.TreePresenter Setting this value to None turns off the display hook.