##// END OF EJS Templates
flush stdout/err before printing tracebacks
fperez -
Show More
@@ -60,7 +60,7 b' You can implement other color schemes easily, the syntax is fairly'
60 60 self-explanatory. Please send back new schemes you develop to the author for
61 61 possible inclusion in future releases.
62 62
63 $Id: ultraTB.py 1956 2006-11-30 05:22:31Z fperez $"""
63 $Id: ultraTB.py 2027 2007-01-19 00:55:09Z fperez $"""
64 64
65 65 #*****************************************************************************
66 66 # Copyright (C) 2001 Nathaniel Gray <n8gray@caltech.edu>
@@ -248,6 +248,8 b' class ListTB(TBTools):'
248 248 TBTools.__init__(self,color_scheme = color_scheme,call_pdb=0)
249 249
250 250 def __call__(self, etype, value, elist):
251 Term.cout.flush()
252 Term.cerr.flush()
251 253 print >> Term.cerr, self.text(etype,value,elist)
252 254
253 255 def text(self,etype, value, elist,context=5):
@@ -716,6 +718,8 b' class VerboseTB(TBTools):'
716 718 def handler(self, info=None):
717 719 (etype, evalue, etb) = info or sys.exc_info()
718 720 self.tb = etb
721 Term.cout.flush()
722 Term.cerr.flush()
719 723 print >> Term.cerr, self.text(etype, evalue, etb)
720 724
721 725 # Changed so an instance can just be called as VerboseTB_inst() and print
@@ -833,6 +837,8 b' class AutoFormattedTB(FormattedTB):'
833 837
834 838 if out is None:
835 839 out = Term.cerr
840 Term.cout.flush()
841 out.flush()
836 842 if tb_offset is not None:
837 843 tb_offset, self.tb_offset = self.tb_offset, tb_offset
838 844 print >> out, self.text(etype, evalue, etb)
@@ -1,3 +1,9 b''
1 2007-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
2
3 * IPython/ultraTB.py (AutoFormattedTB.__call__): properly flush
4 all output streams before printing tracebacks. This ensures that
5 user output doesn't end up interleaved with traceback output.
6
1 7 2007-01-10 Ville Vainio <vivainio@gmail.com>
2 8
3 9 * Extensions/envpersist.py: Turbocharged %env that remembers
General Comments 0
You need to be logged in to leave comments. Login now