<div dir="ltr"><div class="markdown-here-wrapper" style><p style="margin:1.2em 0px!important">Yes, output from the IPython kernel is associated with the input that caused it via a notion of a <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;background-color:rgb(248,248,248)">parent</code>. In the notebook, each cell causes a particular set of output. If output is received and not associated with a cell on the page, it is discarded. Output from startup files has no parent, and is thus discarded by the notebook. If we had a place to display orphaned output, we could do this.</p>
<p style="margin:1.2em 0px!important">We could also consider sending output to <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;background-color:rgb(248,248,248)">sys.__stderr__</code> when <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;background-color:rgb(248,248,248)">parent=None</code>, which would mean that kernel output with no parent would at least go to the terminal in which the kernel was started.</p>
<p style="margin:1.2em 0px!important">-MinRK</p>
<div title="MDH:WWVzLCBvdXRwdXQgZnJvbSB0aGUgSVB5dGhvbiBrZXJuZWwgaXMgYXNzb2NpYXRlZCB3aXRoIHRo
ZSBpbnB1dCB0aGF0IGNhdXNlZCBpdCB2aWEgYSBub3Rpb24gb2YgYSBgcGFyZW50YC4gSW4gdGhl
IG5vdGVib29rLCBlYWNoIGNlbGwgY2F1c2VzIGEgcGFydGljdWxhciBzZXQgb2Ygb3V0cHV0LiBJ
ZiBvdXRwdXQgaXMgcmVjZWl2ZWQgYW5kIG5vdCBhc3NvY2lhdGVkIHdpdGggYSBjZWxsIG9uIHRo
ZSBwYWdlLCBpdCBpcyBkaXNjYXJkZWQuIE91dHB1dCBmcm9tIHN0YXJ0dXAgZmlsZXMgaGFzIG5v
IHBhcmVudCwgYW5kIGlzIHRodXMgZGlzY2FyZGVkIGJ5IHRoZSBub3RlYm9vay4gSWYgd2UgaGFk
IGEgcGxhY2UgdG8gZGlzcGxheSBvcnBoYW5lZCBvdXRwdXQsIHdlIGNvdWxkIGRvIHRoaXMuPGRp
dj48YnI+PC9kaXY+PGRpdj5XZSBjb3VsZCBhbHNvIGNvbnNpZGVyIHNlbmRpbmcgb3V0cHV0IHRv
IGBzeXMuX19zdGRlcnJfX2Agd2hlbiBgcGFyZW50PU5vbmVgLCB3aGljaCB3b3VsZCBtZWFuIHRo
YXQga2VybmVsIG91dHB1dCB3aXRoIG5vIHBhcmVudCB3b3VsZCBhdCBsZWFzdCBnbyB0byB0aGUg
dGVybWluYWwgaW4gd2hpY2ggdGhlIGtlcm5lbCB3YXMgc3RhcnRlZC48L2Rpdj48ZGl2Pjxicj48
L2Rpdj48ZGl2Pi1NaW5SSzwvZGl2Pg==" style="height:0;font-size:0em;padding:0;margin:0"></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 4, 2014 at 12:03 PM, Petr Wolf <span dir="ltr"><<a href="mailto:petr.wolf@gmail.com" target="_blank">petr.wolf@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>Hi,</p>
<p>as described on <a href="http://stackoverflow.com/questions/24942378/how-to-propagate-errors-out-of-ipython-profile-to-a-notebook" target="_blank">http://stackoverflow.com/questions/24942378/how-to-propagate-errors-out-of-ipython-profile-to-a-notebook</a>, I wonder how to handle errors in IPython startup code.</p>
<p>While the IPython console prints any errors right upfront, the Notebook app seems to silence them completely.</p>
<p>That can be confusing (as some startup commands may have been executed and others may not) and counterproductive (as the information does not seem to be logged either).</p>
<p>What is the best way to have errors propagated out of the profile, when using nootebook? </p>
<p>Regards,<br>
Petr</p>
<br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div>