fix import and python2.5 with statement