I see. Well, it seems that mode doesn't work in Spyder's embedded
IPython console. You can report this problem at
https://github.com/jupyter/qtconsole
but I doubt a solution will come for this soon.
Cheers,
Carlos
El 15/12/17 a las 11:16, Dave Jones escribió:
http://ipython.readthedocs.io/en/stable/interactive/magics.html
|%doctest_mode|
Toggle doctest mode on and off.
This mode is intended to make IPython behave as much as possible
like a plain Python shell, from the perspective of how its
prompts, exceptions and output look. This makes it easy to copy
and paste parts of a session into doctests. It does so by:
* Changing the prompts to the classic |>>>| ones.
* Changing the exception reporting mode to ‘Plain’.
* Disabling pretty-printing of output.
Note that IPython also supports the pasting of code snippets that
have leading ‘>>>’ and ‘...’ prompts in them. This means that you
can paste doctests from files or docstrings (even if they have
leading whitespace), and the code will execute correctly. You can
then use ‘%history -t’ to see the translated history; this will
give you the input after removal of all the leading prompts and
whitespace, which can be pasted back into an editor.
With these features, you can switch into this mode easily whenever
you need to do testing and changes to doctests, without having to
leave your existing IPython session.
On Friday, December 15, 2017 at 8:38:10 AM UTC-6, Dave Jones wrote:
I'm new to Spyder so maybe I'm missing something?
Inside Spyder 3.2.4-py36h908396f_0 via conda 4.3.30 on Mac OSX 10.12.3
Python 3.6.3 |Anaconda, Inc.| (default, Dec 5 2017, 17:30:25)
Type "copyright", "credits" or "license" for more information.
IPython 6.2.1 -- An enhanced Interactive Python.
Restarting kernel...
In [1]: %doctest_mode
Exception reporting mode: Plain
Doctest mode is: ON
In [2]:
Notice that the prompt did not change to >>>
----------
[invoking from bash shell works s expected]
localhost:~/miniconda3/bin/ipython3
Python 3.6.3 |Anaconda, Inc.| (default, Dec 5 2017, 17:30:25)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]:
In [1]:
In [1]: %doctest_mode
Exception reporting mode: Plain
Doctest mode is: ON
>>>
Is this cause for concern?
Thanks
--
You received this message because you are subscribed to the Google
Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at https://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.