|
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
|