or code that is to be run as a doctest in Python Sphinx, a useful trick to use in iPython
is
%doctest_mode
For example:
>>> import numpy as np
>>> some_value = 35
>>> np.sqrt(some_value)
You can copy this directly into iPython and it will treat it like normal python code.
No need having to copy every line of code after
>>>
No comments:
Post a Comment