old_contents: 
  def help(args=None):
      import sys, petsc4py
      petsc4py.init(sys.argv + ['-help'])
      from petsc4py import PETSc
      ARGS = args or sys.argv[1:]
      COMM = PETSc.COMM_SELF
      #if 'options' in args:
      #    opt = PETSc.Options()
      #    opt.setFromOptions()
      if 'vec' in ARGS:
          vec = PETSc.Vec().create(comm=COMM)
          vec.setSizes(0)
          vec.setFromOptions()
          del vec
      #if 'vecscatter' in ARGS:
      #    i = PETSc.IS().createGeneral([0], comm=COMM)
      #    v = PETSc.Vec().create(comm=COMM)
      #    v.setSizes(1)
      #    v.setType(PETSc.Vec.Type.SEQ)
      #    scatter = PETSc.Scatter().create(v,i,v,i)
      if 'mat' in ARGS:
          mat = PETSc.Mat().create(comm=COMM)
          mat.setSizes([0, 0])
          mat.setFromOptions()
          del mat
      if 'ksp' in ARGS:
          ksp = PETSc.KSP().create(comm=COMM)
          ksp.setFromOptions()
          del ksp
      if 'pc' in ARGS:
          pc = PETSc.PC().create(comm=COMM)
          pc.setFromOptions()
          del pc
      if 'snes' in ARGS:
          snes = PETSc.SNES().create(comm=COMM)
          snes.setFromOptions()
          del snes
      if 'ts' in ARGS:
          ts = PETSc.TS().create(comm=COMM)
          ts.setFromOptions()
          del ts
  
  if __name__ == '__main__':
      help()
  
new_contents: """
  Command line access to the PETSc Options Database.
  
  This module intends to provide command line access to the PETSc
  Options Database. It outputs a listing of the many PETSc options
  indicating option names, default values and descriptions. If you have
  Python 2.4 and above, then you can issue at the command line::
  
    $ python -m petsc4py.help [vec|mat|ksp|pc|snes|ts] [<petsc-option-list>]
  
  """
  
  def help(args=None):
      import sys
      # program name
      try:
          prog = sys.argv[0]
      except Exception:
          prog = getattr(sys, 'executable', 'python')
      if args is None:
          args = sys.argv[1:]
      elif isinstance(args, str):
          args = args.split()
      else:
          args = [str(a) for a in args]
      import petsc4py
      petsc4py.init([prog, '-help'] + args)
      from petsc4py import PETSc
      COMM = PETSc.COMM_SELF
      if 'vec' in args:
          vec = PETSc.Vec().create(comm=COMM)
          vec.setSizes(0)
          vec.setFromOptions()
          del vec
      if 'mat' in args:
          mat = PETSc.Mat().create(comm=COMM)
          mat.setSizes([0, 0])
          mat.setFromOptions()
          del mat
      if 'ksp' in args:
          ksp = PETSc.KSP().create(comm=COMM)
          ksp.setFromOptions()
          del ksp
      if 'pc' in args:
          pc = PETSc.PC().create(comm=COMM)
          pc.setFromOptions()
          del pc
      if 'snes' in args:
          snes = PETSc.SNES().create(comm=COMM)
          snes.setFromOptions()
          del snes
      if 'ts' in args:
          ts = PETSc.TS().create(comm=COMM)
          ts.setFromOptions()
          del ts
  
  if __name__ == '__main__':
      help()
  
subject: Update cmdline help module