<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Jan 5, 2014 at 12:19 PM, Andrew Gibiansky <span dir="ltr"><<a href="mailto:andrew.gibiansky@gmail.com" target="_blank">andrew.gibiansky@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">That's a good idea, but there's no IPython input channel. Instead, the backend (my interpreter) has to *request* input from the frontend, which then supplies this input. The input is entered via a web browser, so there's not even a handle or file descriptor to speak of.</div>



</div>
</blockquote></div><br></div><div class="gmail_extra">Ugh, so you really do need to trigger an event when the code in the cell requests input.  How does python handle this?</div><div class="gmail_extra"><br></div><div class="gmail_extra">

Here's a horrible idea, but in the spirit of brainstorming... you could run the cell code in a separate app (fork off your interpreter), using ptrace (for linux; I'm not sure how to do this on other OSes) to detect system calls that involve stdin, and then supply input based on that.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">Aside from being tricky to do for all platforms, that's also going to have a horrible user experience for any code that loops over std in rapidly to get what would otherwise appear as a single input to the user, but I'm grasping at straws...</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">--Rogan</div></div>