error with help(notebook)

21 views
Skip to first unread message

a.barb...@studenti.unibs.it

unread,
Dec 8, 2014, 6:01:27 PM12/8/14
to sage-s...@googlegroups.com
I would read the notebook help but it fails:

sage: help (notebook)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-7-f515d687bfdb> in <module>()
----> 1 help (notebook)

/home/ale/Scaricati/sage-6.3/local/lib/python2.7/site-packages/sage/misc/sagedoc.pyc in help(module)
   
1454             from sage.misc.sageinspect import sage_getdef, _sage_getdoc_unformatted
   
1455             docstr = 'Help on ' + str(module) + '\n'
-> 1456             docstr += 'Definition: ' + module.__name__ + sage_getdef(module) + '\n'
   
1457             pydoc.pager(docstr + _sage_getdoc_unformatted(module))
   
1458         else:

/home/ale/Scaricati/sage-6.3/local/lib/python2.7/site-packages/sage/misc/lazy_import.so in sage.misc.lazy_import.LazyImport.__getattr__ (build/cythonized/sage/misc/lazy_import.c:2837)()

AttributeError: NotebookObject instance has no attribute '__name__'




Informativa sulla Privacy: http://www.unibs.it/node/8155

a.barb...@studenti.unibs.it

unread,
Dec 8, 2014, 6:13:11 PM12/8/14
to sage-s...@googlegroups.com
 
forgot to add
sage: version()
'Sage Version 6.3, Release Date: 2014-08-10'
uname -a
Linux Host-001 3.16.0-4-amd64 #1 SMP Debian 3.16.7-2 (2014-11-06) x86_64 GNU/Linux



 

kcrisman

unread,
Dec 8, 2014, 8:33:50 PM12/8/14
to sage-s...@googlegroups.com

I would read the notebook help but it fails:

sage: help (notebook)


This is in fact expected.  Try

sage: notebook?

for what you most likely want.  Or, 

sage: import sagenb
sage: help(sagenb.notebook)

this is because `help` needs a Python module, not just a command.   In general, the ? syntax is the way to go for help - see e.g. http://sagemath.org/doc/prep/Intro-Tutorial.html#help-inside-sage for more examples.  Good luck!

- kcrisman

a.barb...@studenti.unibs.it

unread,
Dec 9, 2014, 11:59:32 AM12/9/14
to sage-s...@googlegroups.com

Thank you, just what i wanted.
Reply all
Reply to author
Forward
0 new messages