diff --git a/IPython/Magic.py b/IPython/Magic.py index 0187dbb..722cad2 100644 --- a/IPython/Magic.py +++ b/IPython/Magic.py @@ -1164,7 +1164,7 @@ Currently the magic system has the following functions:\n""" if logfname: logfname = os.path.expanduser(logfname) rc.opts.logfile = logfname - loghead = self.shell.loghead_tpl % (rc.opts,rc.args) + loghead = self.shell.loghead_tpl % (sys.stdin.encoding, rc.opts, rc.args) try: started = logger.logstart(logfname,loghead,logmode, log_output,timestamp,log_raw_input) diff --git a/IPython/iplib.py b/IPython/iplib.py index 6e84735..d7309fa 100644 --- a/IPython/iplib.py +++ b/IPython/iplib.py @@ -670,7 +670,7 @@ class InteractiveShell(object,Magic): # logstart method. self.loghead_tpl = \ """#log# Automatic Logger file. *** THIS MUST BE THE FIRST LINE *** -#log# DO NOT CHANGE THIS LINE OR THE TWO BELOW +#log# DO NOT CHANGE THIS LINE OR THE TWO BELOW -* coding: %s *- #log# opts = %s #log# args = %s #log# It is safe to make manual edits below here.