Sadly, this isn't available in python-2.5, which we still support.