Opened 14 years ago
Closed 13 years ago
#2777 closed defect (fixed)
[with patch, positive review] '??' can't always find the source
Reported by: | justin | Owned by: | was |
---|---|---|---|
Priority: | major | Milestone: | sage-3.1.3 |
Component: | user interface | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Here's an example:
sage: notebook??
Then the screen clears and is replaced by
Type: instance Base Class: sage.server.notebook.notebook_object.NotebookObject String Form: <sage.server.notebook.notebook_object.NotebookObject instance at 0xb5d66c0> Namespace: Interactive Docstring [source file open failed]: Start the SAGE Notebook server. INPUT: ...
piped through my PAGER ('less'). After quitting this, I see
Error getting source: arg is not a module, class, method, function, traceback, frame, or code object
This is in $SAGE_ROOT for sage-2.11. "./sage" is not modified to fix SAGE_ROOT, and "." is in my PATH. Oh, and I'm using the command-line, of course :-}
Attachments (1)
Change History (6)
comment:1 Changed 14 years ago by
- Milestone set to sage-3.0
Changed 13 years ago by
comment:2 Changed 13 years ago by
- Summary changed from '??' can't always find the source to [with patch, needs review] '??' can't always find the source
added quick'n'dirty patch...
the case with notebook?? can be also seen with all class instances, I made quick patch that make sage.misc.sageinspect.sage_get* functions work with class instances by returning data of class coresponding to given instance... also made notebook version of ?? check for _sage_src_ like was already done in console version.
I don't know if this covers all cases, but works for reported notebook (and also for R functions and probably more)
comment:3 Changed 13 years ago by
- Summary changed from [with patch, needs review] '??' can't always find the source to [with patch, positive review] '??' can't always find the source
Works for me for instance classes. New style classes still don't work, but it's not immediately obvious how to handle that case (#4183) so I think this should be merged.
comment:4 Changed 13 years ago by
Andrzej,
please post patches in the future and not diffs since I can accidentally import diffs and then the credit in the log would go to me. Not that I mind .... :)
Cheers,
Michael
comment:5 Changed 13 years ago by
- Resolution set to fixed
- Status changed from new to closed
Merged in Sage 3.1.3.alpha1
quick'n