tags:

views:

82

answers:

3

I'd like to generate SVG images (e.g. general artwork, not just charts or graphs) using Python. What's the best Python SVG library that supports broadest range of SVG's feature set?

+2  A: 

Take a look at the Inkscape codebase. There's almost nothing it can't do with SVG, and the code is open source.

Inkscape looks more than capable for doing advanced SVG creation/manipulation, but it's written in C++. If Python wrappers existed I'd be more than delighted. Maybe some some cli wrappers + `subprocess` calls would work, but I just took a brief overview of the source. I'll give you a +1 for pointing me to in right the direction when I have to do some SVG manipulation (which should be rather soon.) Oh, and I added links to your post, I hope you don't mind.
sdolan
I'm aware of Inkscape, but I don't think it's suitable. It assumes you're running Python inside Inkscape, not the other way around as I need it.
Chris S
+1  A: 

Hi,

See my answer to this question: http://stackoverflow.com/questions/3501215/svg-interaction-in-python-with-cairo-opengl-and-rsvg/3506346#3506346

echo-flow
Sorry, but I'm looking for something pure-Python. Requiring Jython so you can access Java libs isn't suitable for me.
Chris S
+1  A: 

pySVG is Pure Python (note that it uses dual licensing)

1.01pm