diff options
Diffstat (limited to 'pypers/europython06/ipython-ask.txt')
-rw-r--r-- | pypers/europython06/ipython-ask.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pypers/europython06/ipython-ask.txt b/pypers/europython06/ipython-ask.txt new file mode 100644 index 0000000..0105a9f --- /dev/null +++ b/pypers/europython06/ipython-ask.txt @@ -0,0 +1,20 @@ +Can I cut and paste a doctest into IPython? +I mean, if I have the doctest + +>>> 1+1 +2 + +and I cut and past it into IPython I obviously get + +File "<console>", line 1 + >>> 1+1 + ^ +SyntaxError: invalid syntax + +but I guess there is an automagic option to avoid this. Am I right? + +Alternatively, I would like leading spaces to be stripped, so that +I could cut and paste example from a reStructuredText document. + + + Michele Simionato |