Hi! I am working with the gap3 devs on introspection with ?? I gather that one approach is to implement _sage_src_ to return a string representation of the code.
Any idea why the first example below gives a "source file open failed", whereas the second works? Where is the code in charge of this? sage: class blah(SageObject): ....: def _sage_src_(self): ....: return 'f\n r\n r\n' ....: sage: x = blah() sage: x?? Type: blah Base Class: <class '__main__.blah'> String Form: <class '__main__.blah'> Namespace: Interactive File: /opt/sage/local/lib/python2.6/site-packages/IPython/FakeModule.py Docstring [source file open failed]: x.__init__(...) initializes x; see x.__class__.__doc__ for signature sage: class blah(SageObject): ....: def _sage_src_(self): ....: return 'coucou\nr\n' ....: sage: x = blah() sage: x?? Type: blah Base Class: <class '__main__.blah'> String Form: <class '__main__.blah'> Namespace: Interactive File: /opt/sage/local/lib/python2.6/site-packages/IPython/FakeModule.py Source: coucou r Thanks! Nicolas -- Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net> http://Nicolas.Thiery.name/ -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org