[IPython-User] Hide code cells in the notebook

Jean-Louis 'Hans' Fuchs jean-louis.fuchs@adfinis-sygroup...
Mon Dec 3 16:12:38 CST 2012


Hi Everybody

I'd like to let you know, that Mark contacted me and I fixed the
problem of loosing code. I changed classes of divs to remove gaps between
outputs and I didn't realize that the notebook uses these classes to save the
contents.

In the new version I don't touch any internals of the notebook.

Best,
	Jean-Louis

On 2012-11-26 17:23:35 +0000, Mark Starnes said:

> On Sat, Nov 24, 2012 at 01:57:45PM +0000, Thomas Kluyver wrote:
>> I just came across this blog post - the author has a bit of Python, which
>> produces a bit of HTML+Javascript, that can interactively hide/show the code
>> parts of a notebook:
>> 
>> http://ganwellresource.blogspot.co.uk/2012/11/
>> hide-ipython-notebook-input-boxes.html
>> 
>> Thomas
> 
>> _______________________________________________
>> IPython-User mailing list
>> IPython-User@scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-user
> 
> 
> First, a big thank-you to everyone who has
> provided to IPython over the years.  I've been
> using it since college and continue to use it at
> work:  the notebook has changed the way I work.
> I think it's wonderful.
> 
> The hiding of code cells was something I am
> interested in so when I saw Thomas' comment,
> I was overjoyed.  I followed it, installed the
> code and started exploring Pandas.  I toggled
> my input and saved the document before messing
> around more.
> 
> The toggled output document, when saved, saved
> *without* the original code (now hidden), without
> out (plots, output etc) but with markdown text.
> On reloading, all the original code and plots etc
> were lost.
> 
> So, beware!  I can replicate this behaviour in
> seconds with the following process:
> 
> In [1]: from pretty import *
>         html_settings()
> Out[1]: Toggle Input
> In [2]: print 'Dont save with input toggled!'
> 
> Run all cells, check the screen output, hit `Toggle Input',
> then save the document.  Exit, reload.
> 
> Now I find my archive isn't working either.  :(
> This behaviour is probably obvious to most.  Not
> me, unfortunately.
> 
> Take care!
> 
> Best regards,
> 
> Mark.


-- 
Adfinis SyGroup AG
Jean-Louis 'Hans' Fuchs, Software Engineer

Keltenstrasse 98 | CH-3018 Bern
Tel.: +41 31 550 31 11




More information about the IPython-User mailing list