fall back functions for python 2.6