Skip to content

Instantly share code, notes, and snippets.

@prideout
Created March 19, 2012 20:36
Show Gist options
  • Save prideout/2126890 to your computer and use it in GitHub Desktop.
Save prideout/2126890 to your computer and use it in GitHub Desktop.
generate SVG
from xml.etree import ElementTree as etree
from functools import partial
Circle = partial(etree.Element, 'svg:circle')
c = Circle(cx='100', cy='200', fill='red')
etree.tostring(c)
# <svg:circle cx="100" cy="200" fill="red" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment