<div dir="ltr">We've used the %load solution for two tutorials now and it works pretty well. See here for examples: <a href="https://github.com/pydy/pydy-tutorial-pycon-2014">https://github.com/pydy/pydy-tutorial-pycon-2014</a>, solutions are in the exercise_solutions directory. The main issue is that you can't "run all" to check whether the complete notebook runs because only the %load cell runs, not the output, so testing the complete notebooks requires lots of manual ctrl-entering.<br>

</div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><br>Jason<br><a href="http://moorepants.info" target="_blank">moorepants.info</a><br><span>+01 530-601-9791</span><br></div></div>
<br><br><div class="gmail_quote">On Sun, Jun 22, 2014 at 11:57 AM, 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 22 juin 2014 à 17:39, Benjamin Root a écrit :<br>
<div class=""><br>
> Hmm, I rather like this idea. It lets me keep the solutions packaged with the tutorials (which helps students who aren't taking the class), but keeps them "out-of-sight, out-of-mind". For the %load, can I do relative paths?<br>


<br>
</div>WRT current kernel working directory, I think so.<br>
You can even use URL.<br>
<span class="HOEnZb"><font color="#888888">--<br>
</font></span><div class="HOEnZb"><div class="h5">M<br>
<br>
><br>
> Cheers!<br>
> Ben Root<br>
><br>
><br>
> On Sun, Jun 22, 2014 at 9:31 AM, Matthias Bussonnier <<a href="mailto:bussonniermatthias@gmail.com">bussonniermatthias@gmail.com</a>> wrote:<br>
> What about just having solution in a separate folder and just %load them ?<br>
><br>
> You can then just "publish" the folder at the end of tutorial, or even at beginning.<br>
><br>
> --<br>
> M<br>
><br>
><br>
> Le 22 juin 2014 à 01:29, Aaron Meurer a écrit :<br>
><br>
> > My advice is to stay low tech. I tried a fancy thing<br>
> > (ipython_doctester) at my scipy tutorial last year, and it was more<br>
> > trouble than it was worth.<br>
> ><br>
> > In this case, just make a separate notebook with solutions. The way I<br>
> > do it is I make the solutions notebook and then when I am done I copy<br>
> > it and clear out the answers.<br>
> ><br>
> > Aaron Meurer<br>
> ><br>
> >> On Jun 21, 2014, at 6:11 PM, Mark Voorhies <<a href="mailto:mark.voorhies@ucsf.edu">mark.voorhies@ucsf.edu</a>> wrote:<br>
> >><br>
> >>> On 06/21/2014 03:46 PM, Benjamin Root wrote:<br>
> >>> I am preparing for my tutorial for SciPy, and I want to avoid making a<br>
> >>> particular mistake I made last year, which was to have an exercise in the<br>
> >>> notebook for students to complete, but no "solution" available. I thought I<br>
> >>> would just type up the solution live, on-the-spot, but ended up making a<br>
> >>> complete fool of myself (it is all on YouTube, too...)<br>
> >>><br>
> >>> So, I was thinking of some sort of way to toggle an input cell that can<br>
> >>> reveal itself when I want to. I have seen some previous discussions on this<br>
> >>> topic, but I am not quite sure if they are what I am looking for. Note, I<br>
> >>> am completely clueless on how to add additional features, plugins, etc  to<br>
> >>> a notebook, and really am very bad at javascript. Of couse, I am open to<br>
> >>> other suggestions that others have done for their tutorials,<br>
> >><br>
> >> Low tech solution:<br>
> >>  Stage the "hidden" cell content elsewhere (e.g., an emacs buffer) and<br>
> >> paste it in when you need it =)<br>
> >><br>
> >> --Mark<br>
> >><br>
> >> P.S. My experience is that if solutions to exercises are available (as<br>
> >> part of a distributed notebook, in slides, on the course website) at<br>
> >> least a few students will jump ahead rather than trying the exercise.<br>
> >> Not necessarily the end of the world, but it gets in the way of seeing<br>
> >> alternate solutions/etc...<br>
> >><br>
> >><br>
> >> so long as<br>
> >>> they are documented well, and is easy to distribute to students taking an<br>
> >>> introductory course.<br>
> >>><br>
> >>> Cheers!<br>
> >>> Ben Root<br>
> >>><br>
> >>><br>
> >>><br>
> >>> _______________________________________________<br>
> >>> IPython-dev mailing list<br>
> >>> <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
> >>> <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
> >><br>
> >><br>
> >> _______________________________________________<br>
> >> IPython-dev mailing list<br>
> >> <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
> >> <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
> > _______________________________________________<br>
> > IPython-dev mailing list<br>
> > <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
> > <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
><br>
> _______________________________________________<br>
> IPython-dev mailing list<br>
> <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
> <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
><br>
> _______________________________________________<br>
> IPython-dev mailing list<br>
> <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
> <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br>
_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
</div></div></blockquote></div><br></div>