Clean up io/petsc.py.