[lxml-dev] lxml segfaults

John Morris jman at zultron.com
Fri Jul 4 07:26:24 CEST 2008


Update:  recompiled python-lxml-2.0.7-1.el5.x86_64.rpm with 
--without-threading, same problem.

Thanks!

	John


John Morris wrote:
> I'm trying to subclass lxml._Element.  I'm completely new to python, so 
> I'm definitely doing something wrong.  The code below segfaults.  Tried 
> this with both lxml 1.3.6 and 2.0.7 (both from EPEL 5) along with 
> libxslt 1.1.17 (CentOS 5 updates).  Someone beat me over the head with a 
> clue?
> 
> Thanks!
> 
> 	John
> 
> 
> Sysconf.py:
> --------------------
> from lxml import etree
> 
> class Sysconf(etree._Element):
>      def __init__(self,datastore):
>          etree._Element.__init__(self)
> 
> 
> test.py:
> --------------------
> #!/usr/bin/python
> 
> from lxml import etree
> import Sysconf
> 
> sysconf = Sysconf.Sysconf("sysconf.xml")
> 
> print etree.tostring(sysconf)
> _______________________________________________
> lxml-dev mailing list
> lxml-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/lxml-dev


More information about the lxml-dev mailing list