pySVG.setVersion('0.2.0')
I just updated pySVG to 0.2.0 skipping some four 0.0.1s in the process. Go and grab it either as zip directly or take a look at the current repository.
I rewrote most of the class hierarchy, using multiple inheritance were possible. Unfortunately epidoc does not support multiple inheritance. This results in the html documentation being rather poor for all elements that have more than one class they inherit from. Not a single member of any superclass is then shown in the api doc. (sighs)
If anyone knows of a python documentation system that handles this case better please do email me.
For those that want to get a hint at what you can do, here is my favorite example (sent in a while ago by a user). Expected result code:
#!/usr/bin/python # -*- coding: iso-8859-1 -*- from pysvg.structure import * from pysvg.shape import * import math def testSpiral(): mySVG = svg("a spiral") for i in range(1, 200): x = 2 * i * math.cos(2 * math.pi * i / 40.5) + 450 y = 2 * i * math.sin(2 * math.pi * i / 40.5) + 450 c = circle(x, y, 0.2 * i) fill = 'none' strokewidth = 5 stroke = 'rgb(%s,%s,%s)' % (i, 200 - i, i * (200 - i) / 50) myStyle = 'fill:%s;stroke-width:%s; stroke:%s' % (fill, strokewidth, stroke) c.set_style(myStyle) mySVG.addElement(c) mySVG.save('./testoutput/spiral.svg') if __name__ == '__main__': testSpiral()



By: Kerim in
on 29 September 2009 at 12:23 Etienne Desautels said …
Sphinx (with autodoc) support multiple inheritance.
http://sphinx.pocoo.org/
on 29 September 2009 at 16:25 Jesse Aldridge said …
Got an error when trying to easy_install:
...
Downloading http://www.codeboje.de/downloads/pySV...
Processing pySVG-0.2.0.zip
error: Couldn't find a setup script in /tmp/easy_install-fzw65L/pySVG-0.2.0.zip
on 30 September 2009 at 06:28 Kerim Mansour said …
I had not created an easy_install-able version yet. Just made sure setup.py worked (located in the src subdirectory).
Anyway. I updated a new version with a modified and moved setup.py. This should hopefully work using easy_install.
Please give me feedback.
PS: I will change the repository soon to a dedicated hosted project with googlecode. Hopefully a cleanup of the zip and the checked in sources comes along with that.
on 30 September 2009 at 12:41 Paul Ollis said …
Actually epydoc does support multiple inheritance. I cannot figure out why it failed for you, but I have run epydoc 3.0.1 on pySVG-0.2.0 and it worked fine. In case it helps, I just unpacked the code, changed to the src directory and ran
epydoc $(find . -name '*.py')
on my Linux PC.
on 1 October 2009 at 13:12 Fred Mommeja said …
easy_install worked fine for me (Ubuntu Hardy - Python 2.5.2).
Thanx a lot ^_^