This is going to be neat. <div>Thanks as always Matthias and for correcting my assumption on the "raw input" front....</div><div><br></div><div>Let me get my hands dirty on this.</div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Tue, Nov 27, 2012 at 3:02 PM, Matthias BUSSONNIER <span dir="ltr"><<a href="mailto:bussonniermatthias@gmail.com" target="_blank">bussonniermatthias@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Le 27 nov. 2012 à 09:06, Raju Joseph a écrit :<br>
<div class="im"><br>
> Thanks a lot Johan. This is going to be most helpful.<br>
><br>
> **NOOB question alert**<br>
> Is there any way in which a markdown cell could be used to create an input form to accept variables/parameters?<br>
> These variable values could then be used to pipe into the code in the IPython input cells.<br>
<br>
</div>Yes it is,<br>
Markdown support html and javascript <script> tag.<br>
<br>
just write your form and bind `submit` (or anything else) to a function that call<br>
IPython.notebook.kernel.execute('stringofcode',callbackfunction);<br>
<div class="im"><br>
<br>
><br>
> This along with "toggle input" would be very useful in building quick-fix applications or application prototypes. (especially custom reporting applications)<br>
> Such a notebook created could then be safely shared with business teams (aka teams who go glassy eyed on seeing code that need to be meddled with)<br>
<br>
</div>Toggle input has already been discussed, we want to do it but<br>
* need to find the correct UI.<br>
* There was some issues with CodeMirror Library in hiding code cell.<br>
<div class="im"><br>
> I believe raw input is currently not handled by IPython, hence not sure if that would prevent the creation of such a form.<br>
<br>
</div>Raw input prevent **python** from asking the user to type.<br>
As long as you know that the user will have to enter something you could ask JS to pop up a dialog.<br>
This just is not be possible **while** python code are executed.<br>
<div class="im"><br>
> Seeking forgiveness in advance if the question was a stupid one.<br>
<br>
</div>That was not a stupid question, and questions are never stupid,<br>
The answer is just more obvious to people in the field.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Matthias<br>
</font></span><div class="HOEnZb"><div class="h5">><br>
> Many Thanks,<br>
> Raju<br>
><br>
><br>
> On Tue, Nov 27, 2012 at 12:25 AM, Johan Beke <<a href="mailto:johanbeke@hotmail.com">johanbeke@hotmail.com</a>> wrote:<br>
> Putting the following code in a markdown cell works fine for me:<br>
><br>
> <script type="text/javascript"><br>
> show=true;<br>
> function toggle(){<br>
> if (show){<br>
> $('div.input').hide();<br>
> }else{<br>
> $('div.input').show();<br>
> }<br>
> show = !show<br>
> }<br>
> </script><br>
> <a href="javascript:toggle()" target="_self">toggle input</a><br>
><br>
> Johan<br>
><br>
> _______________________________________________<br>
> IPython-User mailing list<br>
> <a href="mailto:IPython-User@scipy.org">IPython-User@scipy.org</a><br>
> <a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
><br>
><br>
> --<br>
> --raju<br>
> _______________________________________________<br>
> IPython-User mailing list<br>
> <a href="mailto:IPython-User@scipy.org">IPython-User@scipy.org</a><br>
> <a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
<br>
_______________________________________________<br>
IPython-User mailing list<br>
<a href="mailto:IPython-User@scipy.org">IPython-User@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><font color="#999999">--raju</font><br>
</div>