From 58753729e57c94d325b54d3c4bb1f69037c3ace3 2011-05-27 22:48:53 From: Luis Pedro Coelho Date: 2011-05-27 22:48:53 Subject: [PATCH] BUG Add newlines to ipython_log This ensures that the ipython_log.py can actually be run. --- diff --git a/IPython/core/magic.py b/IPython/core/magic.py index dba5bc1..cde29a4 100644 --- a/IPython/core/magic.py +++ b/IPython/core/magic.py @@ -1178,11 +1178,12 @@ Currently the magic system has the following functions:\n""" log_write = logger.log_write output_hist = self.shell.history_manager.output_hist for n in range(1,len(input_hist)-1): - log_write(input_hist[n].rstrip()) + log_write(input_hist[n].rstrip() + '\n') if n in output_hist: log_write(repr(output_hist[n]),'output') else: - logger.log_write(''.join(input_hist[1:])) + logger.log_write('\n'.join(input_hist[1:])) + logger.log_write('\n') if timestamp: # re-enable timestamping logger.timestamp = True