Don't know about other versions of Python but in my case this works like a charm.