rewriting import statements for python 2.5.

Seems to be working ok.