how to scroll down more when doing ?? for long listing?

2 views
Skip to first unread message

Nasser Abbasi

unread,
Nov 24, 2009, 8:27:22 PM11/24/09
to sage-support
hi;

I have 2 questions below:

I created an account on sagenb.org, and when I do

solve??

I get the listing, but it does not list the whole code, and there is
no way for me to look below what is shown on the screen (there is no
scroll bar for use to scroll down more). My browser ofcourse has
scroll down bar, but not for the listing itself.

Is this a feature of the server or a bug?

I also find it strange that I could not use wild card for searching, I
keep forgetting name of commands. It would nice if one in sage can
write

*solve*?

No object '' currently defined.

to get listing of all functions in which the word 'solv' is in its
name, as I can do in Mathematica:

*solve*?

System`
DSolve LinearSolveFunction NSolve SolveAlways
FrobeniusSolve MainSolve RSolve SolveDelayed
LinearSolve NDSolve Solve

AbstractAlgebra`Master`
RingSolve


May be this can be added for a future release as it is really useful
to have.

--Nasser

Marshall Hampton

unread,
Nov 24, 2009, 8:38:29 PM11/24/09
to sage-support
What browser are you using? The browser scroll bar works fine for me
with long ?? entries.

As a temporary workaround, to get the code of an object foo you could
do something like:

print open(foo.__code__.co_filename).read()

-Marshall Hampton

Nasser Abbasi

unread,
Nov 24, 2009, 9:07:08 PM11/24/09
to sage-support


On the scroll part: I think it is my error.

My eyes are trained to look for closing end if and some sort of end of
function indicator. So I assumed there is more code to follow since I
saw an 'if' and no closing for the 'if'

After I posted this, I realized that the listing is all there is, and
this is, like, pyhton, duh, and it has no end if, and end def, but
uses indentation to indicate the structure of the code.

silly me.

I find it nice that one can list the source code.
--Nasser

Simon King

unread,
Nov 25, 2009, 6:53:58 AM11/25/09
to sage-support
Hi Nasser!

On Nov 25, 1:27 am, Nasser Abbasi <n...@12000.org> wrote:
> I also find it strange that I could not use wild card for searching, I
> keep forgetting name of commands. It would nice if one in sage can
> write
>
> *solve*?
>
>     No object '' currently defined.
>
> to get listing of all functions in which the word 'solv' is in its
> name, as I can do in Mathematica:
>
> *solve*?

I agree that this would be nice.

However, the commands search_def, search_doc and search_src might
help.

For example,
sage: search_def('solve')
yields
matrix/matrix_modn_sparse.pyx:860: def
_solve_right_nonsingular_square(self, B, algorithm=None, check_rank =
True):
matrix/matrix2.pyx:84: def solve_left(self, B, check=True):
matrix/matrix2.pyx:125: def solve_right(self, B, check=True):
matrix/matrix2.pyx:304: def _solve_right_nonsingular_square(self,
B, check_rank=True):
matrix/matrix2.pyx:371: def _solve_right_general(self, B,
check=True):
matrix/matrix_integer_dense_hnf.py:297:def
solve_system_with_difficult_last_row(B, a):
matrix/matrix_integer_dense_saturation.py:104:def
solve_system_with_difficult_last_row(B, A):
matrix/matrix_double_dense.pyx:764: def solve_left_LU(self, b):
matrix/matrix_double_dense.pyx:820: def solve_left(self,vec):
matrix/matrix_integer_dense.pyx:3514: def
_solve_right_nonsingular_square(self, B, check_rank=True):
...
(a total of 39 lines)

Kind regards,
Simon
Reply all
Reply to author
Forward
0 new messages