Re: How to flag code cells to not execute
Matthias Bussonnier <[email protected]> Mon, 11 May 2015 10:39:34 -0700
| Newsgroups | gmane.comp.python.ipython.user |
|---|---|
| Message-ID | <CANJQusUsYYT99475kd2+czBmCBtkpD4SJ5kz4=bbYukJRbVeEQ@mail.gmail.com> |
Please use IPython-dev mailing list we are deprecating IPython-user. (where did you found the link to this list BTW?) for your question you need to use notebook extensions. Take a look at github/ipython-contrib. it will require custom cell-toolbar to tag cell, and modify the run-all action to run only the tagged-cells. Cheers, -- Matthias On Mon, May 11, 2015 at 9:43 AM, Jody Klymak <[email protected]> wrote: > Not pretty, but you could simply wrap all your code in if statements: e.g.: > > if 1: > dostuff1() > …. > > or > > if 0: > dostuff2() > …. > > Cheers, Jody > >> On 11 May 2015, at 7:10 AM, triccare <[email protected]> wrote: >> >> Greetings, >> >> Often I find myself trying a number of things, creating many, many code >> cells. Eventually, I get a set of code cells that do what I want. >> >> However, I do not want to delete the less-desirable code cells, either to >> remember what was tried, or provide alternate methods. But, on reloading >> the notebook and/or re-running all the cells, it would be great to be able >> to flag these cells to not execute. >> >> Changing the cell type will loose the code formatting. I want the cells to >> remain code cells, just not actually execute the code. >> >> Is there a way to get the above? And if not, this would be a feature >> request. >> >> Thank you for your time, >> t >> >> >> >> -- >> View this message in context: http://python.6.x6.nabble.com/How-to-flag-code-cells-to-not-execute-tp5094568.html >> Sent from the IPython - User mailing list archive at Nabble.com. >> _______________________________________________ >> IPython-User mailing list >> [email protected] >> http://mail.scipy.org/mailman/listinfo/ipython-user > > -- > Jody Klymak > http://web.uvic.ca/~jklymak/ > > > > > > _______________________________________________ > IPython-User mailing list > [email protected] > http://mail.scipy.org/mailman/listinfo/ipython-user _______________________________________________ IPython-User mailing list [email protected] http://mail.scipy.org/mailman/listinfo/ipython-user