##// END OF EJS Templates
Fix writing history with output to a file in Python 2...
Thomas Kluyver -
Show More
@@ -24,6 +24,7 b' from IPython.core.magic_arguments import (argument, magic_arguments,'
24 24 parse_argstring)
25 25 from IPython.testing.skipdoctest import skip_doctest
26 26 from IPython.utils import io
27 from IPython.utils.py3compat import cast_unicode_py2
27 28
28 29 #-----------------------------------------------------------------------------
29 30 # Magics class implementation
@@ -213,7 +214,7 b' class HistoryMagics(Magics):'
213 214 inline = "\n... ".join(inline.splitlines()) + "\n..."
214 215 print(inline, file=outfile)
215 216 if get_output and output:
216 print(output, file=outfile)
217 print(cast_unicode_py2(output), file=outfile)
217 218
218 219 if close_at_end:
219 220 outfile.close()
General Comments 0
You need to be logged in to leave comments. Login now