It appears the following modification to petsc_conf.py is sufficient to get PetscBinaryIO.py working:
change:
if os.environ.has_key('PETSC_DIR’):
to
if 'PETSC_DIR' in os.environ:
and
if os.environ.has_key('PETSC_ARCH’):
to
if 'PETSC_ARCH' in os.environ:
-gideon