xref: /petsc/src/snes/tests/ex1.py (revision 0923d1d9c1f402ee92f3700329e9f6a3ad4a4aa4)
1from petsc4py import PETSc
2
3class MySNES(object):
4
5    def view(self, snes, vwr):
6        viewctx = snes.appctx
7        if viewctx is not None:
8            viewctx = 'C pointer'
9        vwr.printfASCII(f'  My context: {viewctx}\n')
10