Initial leanup for python3.  Exceptions use as.  Python3 list comprehension variables are not exposed out of scope.  Local imports use ".".  Still more to do for python3.