if child:
    print(child.GetObjectDescription())

def create_pmat_options():
    usage = 'usage: %prog'
description = 'Call po on the child called "matA"'
parser = optparse.OptionParser(description=description, prog='pmat', usage=
    usage)
return parser

def __lldb_init_module(debugger, dict):
    parser = create_pmat_options()
pmat.__doc__ = parser.format_help()
debugger.HandleCommand('command script add -f %s.pmat pmat' % __name__)
How can I automate this sequence of lldb commands?