Blog. July 2011

Khan Academy now has a series of videos on Python programming, and I've spent way too much of this weekend watching them, despite knowing all the basics of Python (I did learn a couple of things though). In fact, I spent so much time watching video, I finally broke the million point mark (and now have 77 points in binary):

Topics:

This a quick post prompted by a question of Stack Overflow about how to move one element drawn after another below it. Because of the way SVG works, sequentially drawing elements on the page in the order they are in the file, there is no simple way to do this. Instead you have to play with the DOM, grabbing the element you want to bury and inserting it into the beginning of the document.

Topics:

I've written dozens of different Python programs that write SVGs of various types, so I thought it was about time I wrote a single generic module to make writing SVGs easy. Unsurprisingly, I'm not the only person to have had this idea, but rather than try to learn how to use someone else's module, I decided to write my one. It's more fun anyway. If anyone else wants to use the module it's available to download (and edit) on Github: