PyMOL>def foo(moo=2): print moo
PyMOL>cmd.extend('foo',foo)
PyMOL>foo
2
PyMOL>foo 3
3
PyMOL>foo moo=5
5
PyMOL>foo ?
Usage: foo [ moo ]
PyMOL>def fie(moo=3):\
PyMOL>"help for fie" \
PyMOL>print moo
PyMOL>print fie.__doc__
help for fie
PyMOL>help fie
Error: unknown topic: 'fie'.
PyMOL>cmd.extend('fie',fie)
PyMOL>help fie

help for fie 

