13 August 2006

Svg in python

After hours of googling, and finding stuff like import cairo.svg, import rsvg and import gtk.librsvg, I found out, that the newest versions of gdk simply understand svg out of the box.

pixbuf = gtk.gdk.pixbuf_new_from_file("black-bishop.svg") will do it all! Sweet.

Conclusion

After I've tried BloGTK, Drivel and gnome-blog-poster, I must say none of them did the job satisfying.

None of them were able to do a title, and none of them could do English spellchecking.

Drivel had a nice "edit old post" function, but gnome-blog-poster had a gnome-panel applet, so I find that it might be the best solution of the three.

However as none of them were able to post titles to posts, they weren't really useful. I guess I have to just use the web interface for now.

Print piping in python

print > open("file","w"), "File content" print >> sys.stdout, "Hello world" What a nice feature of pythons. Had thought this might be possible for a while, but never got the actual syntax. Having programmed php for a time, it is good to be back to python, where you haven't even got to put "\n" in the end of the prints :)