PyClaw is a Python-based interface to the algorithms of Clawpack and SharpClaw. It also contains the PetClaw package, which adds parallelism through PETSc.
The code always tries to import the petsc format reading/writing routines at import time, and we don't want all of pyclaw to fail if petsc4py is not installed, so no error is raised then (only a debug log message). Then when the user tries to read a file in petsc format, they get a cryptic message. This patch checks if petsc4py is installed and informs the user of the problem (but only if/when they try to read a petsc formatted file).
The code always tries to import the petsc format reading/writing routines at import time, and we don't want all of pyclaw to fail if petsc4py is not installed, so no error is raised then (only a debug log message). Then when the user tries to read a file in petsc format, they get a cryptic message. This patch checks if petsc4py is installed and informs the user of the problem (but only if/when they try to read a petsc formatted file).