MAINT: fix Python 3 syntax errors in scipy.weave

It's still not a port to Python 3, but probably makes the fedora people happier: http://projects.scipy.org/scipy/ticket/1843