Re: reg SAGE

26 views
Skip to first unread message

William Stein

unread,
Feb 1, 2012, 11:15:41 AM2/1/12
to parthiban, sage-support
On Wed, Feb 1, 2012 at 7:54 AM, parthiban <parthi...@gmail.com> wrote:
> Respected Sir,
>
> I am Parthiban doing my Ph.D., in the field of Numerical solutions to
> Fractional differential equations in Department of Mathematics, Bharathiar
> University, Coimbator, INDIA.
>
> Recently I came across SAGE software whose mission is to create a
> alternative to mathematica..
>
> In my research I use mathematica. So since SAGE is the alternative with GPL,
> I liked to use it..
>
> I am using Ubuntu 10.04LTS. I downloaded SAGE and installed in my Laptop.
> Now I can able to work in command line interface, but not notebook
> interface..
>
> My questions are
>
> question 1. How to get that notebook interface.. If I type notebook() in the
> terminal of SAGE, it displays the following
>
> sage: notebook()
> The notebook files are stored in: sage_notebook.sagenb
> Removing stale pidfile sage_notebook.sagenb/twistd.pid
> **************************************************
> *                                                *
> * Open your web browser to http://localhost:8000 *
> *                                                *
> **************************************************
> 2012-02-01 21:06:37+0530 [-] Log opened.
> 2012-02-01 21:06:37+0530 [-] twistd 9.0.0
> (/home/parthibankala/Downloads/sage-4.7.1/local/bin/python 2.6.4) starting
> up.
> 2012-02-01 21:06:37+0530 [-] reactor class:
> twisted.internet.selectreactor.SelectReactor.
> 2012-02-01 21:06:37+0530 [-] twisted.web2.channel.http.HTTPFactory starting
> on 8000
> 2012-02-01 21:06:37+0530 [-] Starting factory
> <twisted.web2.channel.http.HTTPFactory instance at 0x9c185ec>
> Error showing url: Failed to execute child process
> "/media/6060557A6055583C/ubuntu" (No such file or directory)

At this point, please try to "open your web browser to
http://localhost:8000" as instructed above. Does this work?

> question 2. When we want help about some commands, it asks to type '?' at
> the end of that command. For example to know about interact command, it is
> asked to type "interact?"..
> when I type this and when i press enter key, it shows the entire help
> documentation of interact and at the end of the documentation it shows
> <END>. I don't know, how to again get back into SAGE prompt.

Press q.

>
> Since I am in a learning mode of SAGE, my questions seems to be silly..
> Please help me in this with broad minded..

They are very reasonable questions. Thanks for asking them. I hope
Sage will become more user friendly so that new users won't have to
ask such questions.

> Hope, if I get the notebook interface, then it solves me lot..
>
> Thank you in advance..
>
> Eagerly waiting for your response..
>
> Back Note:  Your video tutorial is great. Really a great job to the
> beginners. Thanks for your tutorials

Thanks.

>
> With Regards
> Parthiban
> Research Scholar
> Department of Mathematics
> Bharathiar University
> Coimbatore - 46.

--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

kcrisman

unread,
Feb 1, 2012, 1:53:43 PM2/1/12
to sage-support

> > question 2. When we want help about some commands, it asks to type '?' at
> > the end of that command. For example to know about interact command, it is
> > asked to type "interact?"..
> > when I type this and when i press enter key, it shows the entire help
> > documentation of interact and at the end of the documentation it shows
> > <END>. I don't know, how to again get back into SAGE prompt.
>
> Press q.
>

Thanks for forwarding this, William. I've often wondered how newbies
would know this as well. Somehow I "just knew" it when I started
using Sage, but of course I mostly used the notebook at first, like
many new users. Should we hack less (or more or whatever ? uses) to
include some message? I think it also is unclear what to do with



OUTPUT: an integer or symbolic expression

EXAMPLES:
:

for someone who hasn't used command line much; hopefully trial-and-
error yields that Return and space are useful, but...

Anyone know if these would be easy changes, or would they break a lot
of IPython?

William Stein

unread,
Feb 1, 2012, 2:05:59 PM2/1/12
to sage-s...@googlegroups.com
On Wed, Feb 1, 2012 at 10:53 AM, kcrisman <kcri...@gmail.com> wrote:
>
>> > question 2. When we want help about some commands, it asks to type '?' at
>> > the end of that command. For example to know about interact command, it is
>> > asked to type "interact?"..
>> > when I type this and when i press enter key, it shows the entire help
>> > documentation of interact and at the end of the documentation it shows
>> > <END>. I don't know, how to again get back into SAGE prompt.
>>
>> Press q.
>>
>
> Thanks for forwarding this, William.  I've often wondered how newbies
> would know this as well.  Somehow I "just knew" it when I started
> using Sage, but of course I mostly used the notebook at first, like
> many new users.  Should we hack less (or more or whatever ? uses) to
> include some message?

It is pretty amazing how incredibly non-newbie-friendly less and more are.

We could change ipython or the docstring so it includes a hint at the
end of the message, which would make it so we don't have to hack the
pager (less), so at least the user knows to hit "q".

> I think it also is unclear what to do with
>
>
>
>       OUTPUT: an integer or symbolic expression
>
>       EXAMPLES:
> :
>
> for someone who hasn't used command line much; hopefully trial-and-
> error yields that Return and space are useful, but...

Yep. My solution of adding something to the docstring doesn't help
for this problem. Usually people do figure it out though.

>
> Anyone know if these would be easy changes, or would they break a lot
> of IPython?
>

> --
> To post to this group, send email to sage-s...@googlegroups.com
> To unsubscribe from this group, send email to sage-support...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org

Michael Orlitzky

unread,
Feb 1, 2012, 6:30:11 PM2/1/12
to sage-s...@googlegroups.com
On 02/01/2012 02:05 PM, William Stein wrote:
>
> It is pretty amazing how incredibly non-newbie-friendly less and more are.
>
> We could change ipython or the docstring so it includes a hint at the
> end of the message, which would make it so we don't have to hack the
> pager (less), so at least the user knows to hit "q".
>

Do you rely on the system pager? I use most[1] for its
syntax-highlighting of man pages, and it has a row at the bottom like
the emacs minibuffer with basic usage.

Here's a screenshot, since it doesn't really come across in plain text.

[1] http://www.jedsoft.org/most/ (download works, anyway)

polynomial-most.png

Dan Christensen

unread,
Feb 2, 2012, 8:47:12 PM2/2/12
to sage-s...@googlegroups.com
You can set the prompt using the LESS environment variable.
See the PROMPTS section of the less man page. Lots of sophisticated
behaviour is supported.

Dan


William Stein

unread,
Feb 3, 2012, 2:34:45 PM2/3/12
to sage-s...@googlegroups.com

Great idea! More precisely, if on startup of Sage we set the LESS
environment variable as follows (only setting it if it isn't already
set), then the prompt at the end of docstring will be "(END - press q
to quit) " instead of the cryptic "(END)":

export LESS="-P?n?f%f .?m(file %i of %m) ..?e(END - press q to
quit) ?x- Next\: %x..%t"

This is now the palindromic trac 12421:
http://trac.sagemath.org/sage_trac/ticket/12421

-- William

>
> Dan

Reply all
Reply to author
Forward
0 new messages