Interpreter-like help in cmd.Cmd

Sarir Khamsi sarir.khamsi at raytheon.com
Thu Jun 9 19:53:17 EDT 2005


Peter Hansen <peter at engcorp.com> writes:

> class _Helper(object):
>      """Define the built-in 'help'.
>      This is a wrapper around pydoc.help (with a twist).
>
>      """
>
>      def __repr__(self):
>          return "Type help() for interactive help, " \
>                 "or help(object) for help about object."
>      def __call__(self, *args, **kwds):
>          import pydoc
>          return pydoc.help(*args, **kwds)

Thanks, but how do I integrate this with cmd.Cmd?



More information about the Python-list mailing list