# HG changeset patch # User William Stein # Date 1210816973 25200 # Node ID 6eca3be50ce0dd16fe3fa31f53fd9f574fabf70d # Parent feb0c046a6282033252a99f50fa13eac5b8ca034 trac #2992 -- greatly improved robustness of help(foo) diff -r feb0c046a628 -r 6eca3be50ce0 sage/server/support.py --- a/sage/server/support.py Wed May 14 18:10:11 2008 -0700 +++ b/sage/server/support.py Wed May 14 19:02:53 2008 -0700 @@ -89,10 +89,22 @@ def help(obj): For values ord < 0, the result is, strictly speaking, not a mathematical 'norm', but it may still be useful for numerical purposes. - """ - print '
' - pydoc.help(obj) - print '
' + """ + from pydoc import resolve, html, describe + import sage.server.notebook.interact as interact + + print '
' + object, name = resolve(obj) + page = html.page(describe(object), html.document(object, name)) + page = page.replace('Click to open help window   "%filename + print '
' def get_rightmost_identifier(s): X = string.ascii_letters + string.digits + '._'