From: Artem Y. <ne...@gm...> - 2008-07-03 20:31:30
|
Waylan Limberg wrote: >> cElementTree and ElementTree was includeded in Python std lib since >> Python 2.5, but cElementTree itself can be used with Python 1.5.2 and later. >> >> > > Just remember the c variation will not work on IronPython, Jython or > other python implementations. Additionally, there may be (shared) web > hosts which will allow a user to copy a pure python module to the > server, but not compile a c module. So if we do switch, the import > should be in a try...except block and import the non-c variation if c > is not available. Sure, thanks for pointing that out. > In such a situation, would ElementTree give us any > advantage? > > Although, I believe that would give us an instant html/xhtml output > option so it may make sense regardless of any speed increase - that is > as long as it doesn't slow things down. > Yes, ElementTree suports html/xhtml output, so it'll be advantage, but I think pure python version, will be little bit slower than NanoDOM implementation. The best way to know exactly is to test it :) |