So I've always followed the PEP 8 guidelines for imports. http://www.python.org/dev/peps/pep-0008/#imports - which I believe means 'import string' would go back up to the top.