Problems like this have been encountered before. This seems to work around 
problems in the other direction (i.e., let Jupyter deal with an actual file 
rather than one of its streams):

The quickest workaround for now is to just eliminate the whole error 
redirection. We didn't have it before either. If you have control over the 
distribution you use to teach, that might get you through your lecture.

The next step would be to disable the redirection if stderr isn't an actual 

The full solution could probably make do with saving sys.stderr, assigning 
the temporary file to it and afterwards putting it back. You would need the 
right amount of flushes. Furthermore, this is not at all thread-safe (the 
current solution isn't either), so general hygiene would probably require 
forking before redirecting and then reaping the child once the build has 

You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
For more options, visit

Reply via email to