[IPython-User] raw_input replacement in ipython Notebook

MinRK benjaminrk@gmail....
Wed Aug 8 17:29:51 CDT 2012


On Wed, Aug 8, 2012 at 3:26 PM, Carl Smith <carl.input@gmail.com> wrote:

>  > An 'nbinput' function with the same api as raw_input would be great to
>  > offer.  And I agree, that would be the start of a future full
>  > raw_input support code.
>
>  This would be really nice for the web app mode.
>

This wouldn't be too tricky to do half-way with repr_html/js.

What such an approach *cannot* do is prompt/receive input within a single
cell.  You would have to have one cell ask for input (draw the widget), and
then enter that input via the widget (submit result via js kernel.execute
API), and then proceed with other cells that may depend on that input.  If
you want to get a response within a single cell, there is no way around
implementing the stdin_channel handler for the notebook.

-MinRK

_______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20120808/f436efff/attachment.html 


More information about the IPython-User mailing list