Module size should not be a problem. If import performance becomes an issue (which I doubt), libxml2.py could be split into a package with separate modules, so one could import only what's needed. Anyway, generating the enums was easy enough. Here's the patch. -sbi
-----Original Message----- From: Daniel Veillard [mailto:veillard redhat com] Sent: 06 January, 2004 23:55 To: St?phane Bidoul Cc: xml gnome org Subject: Re: [xml] structured errors in python bindings On Tue, Jan 06, 2004 at 05:19:43PM -0500, Daniel Veillard wrote:If the patch looks clean, you can commit, and I'll continue as time permits.Okay I will commit it soonishDone, I also added tstLastError.py to the tests, one thing I notice is that enums like XML_FROM_IO are not generated in the bindings, I think it's possible now since they are exported from the API description: paphio:~/XML -> grep XML_FROM_IO doc/libxml2-api.xml <exports symbol='XML_FROM_IO' type='enum'/> <enum name='XML_FROM_IO' file='xmlerror' value='8' type='xmlErrorDomain' info='The Input/Output stack'/> paphio:~/XML -> I'm just a bit afraid by the associated cost when loading the libxml2 : paphio:~/XML -> grep '<enum ' doc/libxml2-api.xml | wc -l 825 paphio:~/XML -> loading these 825 symbols each time might be a bit heavy, but I also know my performance concerns are not really aligned with Python philosophy either, so YMMV ... Daniel -- Daniel Veillard | Red Hat Network https://rhn.redhat.com/ veillard redhat com | libxml GNOME XML XSLT toolkit
http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
Attachment:
enum.diff
Description: Binary data