On Mar 6, 10:05 am, Ivan Andrus <darthand...@gmail.com> wrote: > Would it be possible to print the warning only if the session is interactive. > Then you wouldn't have to change doctests and wouldn't have to see the > warning when running scripts.
Any time you change the behaviour between interactive and non- interactive sessions you make things harder to debug. Perhaps instead of *printing* something, return a value that has a __repr__ that looks like an informative message. A string would basically do, but it has ugly quotes in its __repr__. Since in non-interactive environments values of statements are thrown away rather than have their repr printed, you'd basically get the behaviour you're asking for. In the notebook only the last statement value of a cell gets printed, but that's an irregularity that we're living with anyway. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.