skip to navigation
skip to content

Not Logged In

ll-xist 4.0

Extensible HTML/XML generator, cross-platform templating language, Oracle utilities and various other tools

Latest Version: 5.7.1

XIST provides an extensible HTML and XML generator. XIST is also a XML parser with a very simple and pythonesque tree API. Every XML element type corresponds to a Python class and these Python classes provide a conversion method to transform the XML tree (e.g. into HTML). XIST can be considered 'object oriented XSLT'.

XIST also includes the following modules and packages:

  • ll.ul4c is compiler for a cross-platform templating language with similar capabilities to Django's templating language. UL4 templates are compiled to an internal format, which makes it possible to implement template renderers in other languages and makes the template code "secure" (i.e. template code can't open or delete files).

    There are implementations for Python, Java, Javascript and PHP.

  • ll.ul4on provides functions for encoding and decoding a lightweight machine-readable text-based format for serializing the object types supported by UL4. It is extensible to allow encoding/decoding arbitrary instances (i.e. it is basically a reimplementation of pickle, but with string input/output instead of bytes and with an eye towards cross-plattform support).

    There are implementations for Python, Java, Javascript and PHP.

  • ll.orasql provides utilities for working with cx_Oracle:

    • It allows calling functions and procedures with keyword arguments.
    • Query results will be put into Record objects, where database fields are accessible as object attributes.
    • The Connection class provides methods for iterating through the database metadata.
    • Importing the modules adds support for URLs with the scheme oracle to ll.url.
  • ll.make is an object oriented make replacement. Like make it allows you to specify dependencies between files and actions to be executed when files don't exist or are out of date with respect to one of their sources. But unlike make you can do this in a object oriented way and targets are not only limited to files.

  • ll.color provides classes and functions for handling RGB color values. This includes the ability to convert between different color models (RGB, HSV, HLS) as well as to and from CSS format, and several functions for modifying and mixing colors.

  • ll.sisyphus provides classes for running Python scripts as cron jobs.

  • ll.url provides classes for parsing and constructing RFC 2396 compliant URLs.

  • ll.nightshade can be used to serve the output of PL/SQL functions/procedures with CherryPy.

  • ll.misc provides several small utility functions and classes.

  • ll.astyle can be used for colored terminal output (via ANSI escape sequences).

  • ll.daemon can be used on UNIX to fork a daemon process.

  • ll.xml_codec contains a complete codec for encoding and decoding XML.

Changes in 4.0 (released 08/08/2012)

  • The source has been ported to Python 3. From now on XIST is a Python 3 only project. A big thanks goes to Martin v. Löwis, who got this conversion started at PyCon DE 2011. He did the basic 2to3 conversion and updated the C source to work on Python 3. Without Martin, XIST wouldn't have made the leap to Python 3 for several years.

  • As there's no Python 3 port of libxml2s Python wrapper, XIST now uses lxml for HTML parsing.

    This change shouldn't have any visible consequences.

  • UL4 templates are no longer compiled to byte code, instead the AST is evaluated or converted to the target sourcecode directly.

  • Generating the final Javascript source code for UL4 templates is now done in Javascript itself.

  • A new module ul4on has been added. This module provides functions for encoding and decoding a lightweight extensible machine-readable text format for serializing the object types supported by UL4.

  • The following new functions have been added to UL4: isfirst, islast, isfirstlast, enumfl. They are variants of enumerate that give information about whether the item is the first and/or last item.

  • The following new functions have been added to UL4: urlquote and urlunquote. They encode/decode the %-escaped form of URL query parameters.

  • The UL4 function json has been renamed to asjson and the following new UL4 functions have been added: fromjson, asul4on and fromul4on.

  • The UL4 function enumerate now supports 1 or 2 arguments (the second argument being the start value).

  • The UL4 functions str, bool, int and float now support being called without arguments (just like in Python).

  • Date constants in UL4 have changed again. They are now written like this: @(2012-04-12) or @(2012-04-12T12:34:56).

  • The <?render?> tag in UL4 now looks like a method call instead of a function call. I.e. <?render t(a=17, b=23)?> has changed to <?render t.render(a=17, b=23)?>.

  • UL4 stacktraces now use exception chaining to report the exception location in nested templates.

  • The UL4 methods find and rfind now support lists and tuples.

  • Two new UL4 functions have been added: min and max.

  • The sort order for attributes when publishing XIST trees can be overwritten by setting the xmlorder class attribute to a string. This string will be used for sorting the attribute. Attributes that have xmlorder set will always be published before those that don't.

  • Support for the old ipipe infrastructure has been removed. Support for IPythons new pretty printing infrastructure has been added. Output looks like this:

    In [1]: from ll.xist.ns import xml, html
    In [2]: html.a(
       ...:         'gurk',
       ...:         xml.Attrs(lang='de'),
       ...:         class_='link',
       ...:         href='http://www.example.org/',
       ...:         id='dings42',
       ...: )
    Out[2]:
    ll.xist.ns.html.a(
       'gurk',
       ll.xist.ns.xml.Attrs.lang='de',
       class_='link',
       href='http://www.example.org/',
       id='dings42')
    
  • Added the attributes allowfullscreen and flashvars to ll.xist.ns.html.embed.

  • Added the attribute allowfullscreen to ll.xist.ns.html.iframe.

  • The isdir method now always returns False for real (i.e. non-file or ssh) URLs. This allows stuff like:

    ucp http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2 \
        ssh://user@www.example.org/~/src/
    
  • ll.orasql.Index now uses the *_INDEXES views to get a list of all indexes and LOB indexes are filtered out, since they will be recreated with the LOB itself. The method table has been fixed for indexes that belong to a different user than the index.

  • ll.orasql.LOBStream has a new method seek.

  • ll.make.FileAction supports encoding/decoding when writing/reading the file. For this use the encoding and errors arguments.

  • The XIST node method sorted has been removed, as it no longer makes sense, because with Python 3 nodes might be uncomparable.

  • Th support for %u escapes in URLs has been removed.

  • The function html.astext now uses the newer links 2

  • The scripts oracreate, oradrop, oradelete, oradiff, oramerge, oragrant, orafind and uhpp no longer have an -e/--encoding option. They always use Pythons output encoding.

  • The options -i/--inputencoding and -o/--outputencoding of the script db2ul4 have been replaced with an option -e/--encoding for the encoding of the template files. For printing the result Pythons output encoding is used.

  • The options --inputencoding,/--inputerrors and --outputencoding/--outputerrors of ll.sisyphus.Job have been replaced with option --encoding/--errors for the encoding of the log files.

  • oradiff now iterates through the object in correct order, so if you're running oradiff with -mfull the output shouldn't produce any errors when executed.

  • ll.orasql.Index can now handle domain indexes.

  • ll.orasql.Preference has been added.

  • ll.orasql now ignores indexes of type IOT - TOP.

  • ll.orasql can now handle primary keys where the underlying index has a different name.

  • ll.orasql now ignores tables with names starting with DR$ (i.e. those created by Oracle Text Search).

  • Attributes of ll.misc.SysInfo instances are now calculated on demand. With this change only one instance of ll.misc.SysInfo is required. This instance is ll.misc.sysinfo.

  • When connecting to the database ll.orasql sets the client_info attribute to the name of the running script (unless clientinfo=None is passed to the connect call).

  • ll.xist.ns.specials.loremipsum now repeats the text if the specified len attribute is greater that the length of the lorem ipsum text.

 
File Type Py Version Uploaded on Size
ll-xist-4.0.tar.bz2 (md5) Source 2012-08-08 377KB
ll-xist-4.0.tar.gz (md5) Source 2012-08-08 445KB
ll-xist-4.0.zip (md5) Source 2012-08-08 528KB
ll_xist-4.0-py3.2-macosx-10.7-x86_64.egg (md5) Python Egg 3.2 2012-08-08 893KB
  • Downloads (All Versions):
  • 571 downloads in the last day
  • 5529 downloads in the last week
  • 34352 downloads in the last month