How2 prompt for data in a notebook?

38 views
Skip to first unread message

steve vonn

unread,
Feb 11, 2008, 3:04:13 AM2/11/08
to sage-...@googlegroups.com
How does one tell Sage to prompt a user for input data within a Sage Notebook?
I tried
{{
raw_input("input an item: ")

input an item: print "\x01r\x01e16"
'print "\\x01r\\x01e16"'
}}

I do not understand the output.
Can one use the raw_input command in a Sage Notebook?
Is it possible to prompt a user for input in a Sage Notebook?

Thanks 4any suggestions
peace

William Stein

unread,
Feb 11, 2008, 3:30:22 AM2/11/08
to sage-...@googlegroups.com, Jason Grout
On Feb 11, 2008 12:04 AM, steve vonn <5463...@gmail.com> wrote:
> How does one tell Sage to prompt a user for input data within a Sage
> Notebook?

It is currently not (really) possible.

> I tried
> {{
> raw_input("input an item: ")
>
> input an item: print "\x01r\x01e16"
> 'print "\\x01r\\x01e16"'
> }}
>
> I do not understand the output.
> Can one use the raw_input command in a Sage Notebook?


No.

> Is it possible to prompt a user for input in a Sage Notebook?

Not yet.

We are working on implementing functionality somewhat like
"Mathematica Demonstrations"
for the Sage notebook. This will make it possible to prompt for input
-- more precisely
one will get an input box that can be filled in. Stay tuned!

William

>
> Thanks 4any suggestions
> peace
>
> >
>

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

Timothy Clemans

unread,
Feb 12, 2008, 12:35:25 AM2/12/08
to sage-newbie
Crunchy, an interactive documentation system for Python, supports the
raw_input function. They might have some useful code to look at.

On Feb 11, 12:30 am, "William Stein" <wst...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages