Looking at trying to minimize code changes for Python 3.
For now we are keeping byte str() in py2 and unicode str()
in py3. It's a pain to rewrite all string code to usee
u'' for py2 compatibility. However we may need to revisit
this for pexpect().
Created compatibility wrappers in util.py:
BaseString (replacement for basestring)
decode() (optionally decode utf-8 for py3)
encode() (optionally encode utf-8 for py3)
Also we've switched from the .iter*() flavors to their
static alternatives for py2 (note they are iterators in py3!)
Changed util.errRun and clean.sh to call decode()