Opened 13 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:

Status badges

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)

2777-1.diff (1.7 KB) - added by aginiewicz 13 years ago.
quick'n

Download all attachments as: .zip

Change History (6)

comment:1 Changed 13 years ago by mabshoff

  • Milestone set to sage-3.0

Changed 13 years ago by aginiewicz

quick'n

comment:2 Changed 13 years ago by aginiewicz

  • 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 robertwb

  • 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 mabshoff

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 mabshoff

  • Resolution set to fixed
  • Status changed from new to closed

Merged in Sage 3.1.3.alpha1

Note: See TracTickets for help on using tickets.