On Wed, Dec 21, 2011 at 7:24 AM, Thomas Kluyver <[email protected]> wrote: > On 21 December 2011 14:03, Aaron Meurer <[email protected]> wrote: >> >> The issue is how to properly doctest these. Is there an easy way to >> doctest IPython notebooks? I am also CC'ing IPython User list. > > > As far as I know there isn't, but it's a logical extension given that we can > save input and output together. > > In the meantime, to turn a notebook into doctests, you could run the cells > and then use "%hist -pof doctests.py 1-12" (the options mean [p]rompts, > [o]utput and [f]ile).
This should work for now. Is is possible to generate these files automatically from the test runner? > >> >> Finally, if we do this, I think we should add something in ./setup.py >> dist (or similar) that automatically adds pdf copies of all the >> notebooks, so that people who don't have IPython can still read the >> examples. Is there an easy way to do this? > > > We should be able to produce a static HTML display of the notebook - I think > we do this for printing, but I don't know if it's yet possible without > starting the notebook server. If you wanted to make PDFs from that, you'd > need something like http://code.google.com/p/wkhtmltopdf/ > > Another possible approach is to export the notebooks as Python code, and use > Sphinx to render them. For that matter, maybe Sphinx could be extended to > load the notebooks directly. > > Thomas Oh, I see. HTML would be better. I thought that it had pdf exporting built-in, as the GCI student submitted that along with the notebook, but I guess he just used print preview or something like that. Aaron Meurer -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
