[docutils:patches] Re: #114 rst2odt_prepstyles.py: Port to ElementTree

Dmitry Shachnev via Docutils-develop <[email protected]>
Newsgroups gmane.text.docutils.devel
Message-ID </p/docutils/patches/114/7cbbbec180247443533cdc4e48c70870bd7d49f9.patches@docutils.p.sourceforge.net>
First error can be fixed by replacing `el.attrib.keys()` with `list(el.attrib)`. Second error can be fixed by changing argument of os.fdopen from `w` to `wb`.

I am attaching an updated version of the patch. Although you may want to commit `w` to `wb` change as a separate revision, for ease of backporting.


Attachments:

- [rst2odt_prepstyles-elementtree.patch](https://sourceforge.net/p/docutils/patches/_discuss/thread/1beea79a/ed4c/3422/attachment/rst2odt_prepstyles-elementtree.patch) (1.6 kB; text/x-patch)


---

** [patches:#114] rst2odt_prepstyles.py: Port to ElementTree**

**Status:** pending-remind
**Group:** None
**Created:** Mon Aug 05, 2013 02:12 PM UTC by Michael Schutte
**Last Updated:** Wed Apr 26, 2023 11:58 AM UTC
**Owner:** nobody
**Attachments:**

- [rst2odt_prepstyles-elementtree.diff](https://sourceforge.net/p/docutils/patches/114/attachment/rst2odt_prepstyles-elementtree.diff) (1.8 kB; text/x-patch)


rst2odt_prepstyles.py currently uses lxml to parse, modify and write XML.  The attached patch makes it use ElementTree instead, which has been part of Python's standard library since 2.5.


---

Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/docutils/patches/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/patches/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.