Sign In/My Account | View Cart  
advertisement

Article:
 Should Python and XML Coexist?
Subject: python wrappers to xml
Date: 2005-08-25 14:40:57
From: antont

in the interactive python notebooks project, http://www.scipy.org/wikis/featurerequests/NoteBook


where originally the idea was to have the notebooks as Python, it was decided to use XML instead as the document format.


i've been working on the document processing part now, trying to develop nice wrappers to the XML so that a nice Python API would still be provided (now mainly for the gui app that's developed for writing the notebooks, i.e. nbshell). feel free to look at the development version at http://projects.scipy.org/ipython/ipython/file/nbdoc/trunk/notabene/notebook.py


the solution is also problematic, 'cause some of the (data) structure information is duplicated -- e.g. the Log object holds a list of cells, but also the corresponding log xml element (accessible as Log.element) has the Cell.elements as xmltree xubelements. but i think this still provides good performance, compared to e.g. xpath queries, and nicer interface (e.g. slicing to get a range of cells).


so this is one example where Python and XML coxist, and are pretty integrated. it's still early in development and feasibility is uncertain, but well, it's a working application too :)


here there's no little languages though, so i'm a bit off topic, but coexistence there sure is.


~Toni


No Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • python wrappers to xml
    2005-08-29 15:38:42 Uche Ogbuji

    Good to hear. I do want to note that the title was a rhetorical question. Python and XML cn certainly coexist. I'm glad to hear the partnership is useful for you, as it has been for me.


Sponsored By: