<br><br><div class="gmail_quote">On Nov 22, 2007 4:14 PM, Fernando Perez <<a href="mailto:fperez.net@gmail.com">fperez.net@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="Ih2E3d">On Nov 22, 2007 2:11 PM, Noah Gift <<a href="mailto:noah.gift@gmail.com">noah.gift@gmail.com</a>> wrote:<br>> Is there any documentation on using doctest in 0.8.2? That is one of the<br>> killer features I am waiting for.
<br><br></div>In [7]: %doctest_mode?<br>Type: Magic function<br>Base Class: <type 'instancemethod'><br>Namespace: IPython internal<br>File: /home/fperez/usr/lib/python2.5/site-packages/IPython/Magic.py
<br>Definition: %doctest_mode(self, parameter_s='')<br>Docstring:<br> Toggle doctest mode on and off.<br><br> This mode allows you to toggle the prompt behavior between normal<br> IPython prompts and ones that are as similar to the default IPython
<br> interpreter as possible.<br><br> It also supports the pasting of code snippets that have leading '>>>'<br> and '...' prompts in them. This means that you can paste doctests from<br>
files or docstrings (even if they have leading whitespace), and the<br> code will execute correctly. You can then use '%history -tn' to see<br> the translated history without line numbers; this will give you the
<br> input after removal of all the leading prompts and whitespace, which<br> can be pasted back into an editor.<br><br> With these features, you can switch into this mode easily whenever you<br> need to do testing and changes to doctests, without having to leave
<br> your existing IPython session.<br><br><br>I'm open to suggestions on how to improve it...</blockquote><div><br class="webkit-block-placeholder"></div><div>Thanks Fernando, I will take a look at this too, this weekend.
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br><br>Cheers,<br><font color="#888888"><br>f<br></font></blockquote></div><br>