[mod_python] libxml2 and libxslt in mod_python

Diego Guillen adsldieg at tpg.com.au
Wed Aug 2 19:53:15 EDT 2006


Hi all,

BACKGROUND
I just started using mod_python 3.1.4 with Apache2 on Ubuntu 6.06 Linux.
[it embeds Python 2.4] I'm translating a small application from PHP5, as
an exercise. It uses classes, simple inheritance, and xslt processing.

I'm looking into /var/log/apache2/error.log, as well as on the Firefox
1.5 browser, for error messages.

COMMENTS
My first impression is that mod_python's error reporting system is not
as pleasant to use. I don't seem to get enough feedback when something
goes wrong, and the error messages don't seem to point to the right
version of the files, nor to the right line numbers.

[It seems that the line numbers are shifted when you use logging, or
when a statement spans over several lines]

When I move the application into another folder, and remove the
references to the mod_python module [simulating the requests], it seems
to be easier to debug directly with the Python 2.4 interpreter.

QUESTIONS
My questions are: 
* is it possible to access the libxml2, libxslt libraries in mod_python?
* is there an alternative better way for doing xslt in Python?
* is there any good Python-based documentation on the use of these
libraries without recurring to the C description (http://xmlsoft.org/)?
* and this may sound heretical on this mailing list: is there a way
better than mod_python to write web applications with Python?

Thanks,
   Diego






More information about the Mod_python mailing list