##// END OF EJS Templates
Merge branch '0.10.2' of https://github.com/TvrtkoM/ipython into TvrtkoM-0.10.2
Fernando Perez -
r3371:cec4ca6d merge
parent child Browse files
Show More
@@ -18,6 +18,7 b" Logger class for IPython's logging facilities."
18 import glob
18 import glob
19 import os
19 import os
20 import time
20 import time
21 import sys
21
22
22 #****************************************************************************
23 #****************************************************************************
23 # FIXME: This class isn't a mixin anymore, but it still needs attributes from
24 # FIXME: This class isn't a mixin anymore, but it still needs attributes from
@@ -241,7 +242,7 b' which already exists. But you must first start the logging process with'
241 if self.timestamp:
242 if self.timestamp:
242 write(time.strftime('# %a, %d %b %Y %H:%M:%S\n',
243 write(time.strftime('# %a, %d %b %Y %H:%M:%S\n',
243 time.localtime()))
244 time.localtime()))
244 write('%s\n' % data)
245 write('%s\n' % data.encode(sys.stdin.encoding))
245 elif kind=='output' and self.log_output:
246 elif kind=='output' and self.log_output:
246 odata = '\n'.join(['#[Out]# %s' % s
247 odata = '\n'.join(['#[Out]# %s' % s
247 for s in data.split('\n')])
248 for s in data.split('\n')])
@@ -1164,7 +1164,7 b' Currently the magic system has the following functions:\\n"""'
1164 if logfname:
1164 if logfname:
1165 logfname = os.path.expanduser(logfname)
1165 logfname = os.path.expanduser(logfname)
1166 rc.opts.logfile = logfname
1166 rc.opts.logfile = logfname
1167 loghead = self.shell.loghead_tpl % (rc.opts,rc.args)
1167 loghead = self.shell.loghead_tpl % (sys.stdin.encoding, rc.opts, rc.args)
1168 try:
1168 try:
1169 started = logger.logstart(logfname,loghead,logmode,
1169 started = logger.logstart(logfname,loghead,logmode,
1170 log_output,timestamp,log_raw_input)
1170 log_output,timestamp,log_raw_input)
@@ -670,7 +670,7 b' class InteractiveShell(object,Magic):'
670 # logstart method.
670 # logstart method.
671 self.loghead_tpl = \
671 self.loghead_tpl = \
672 """#log# Automatic Logger file. *** THIS MUST BE THE FIRST LINE ***
672 """#log# Automatic Logger file. *** THIS MUST BE THE FIRST LINE ***
673 #log# DO NOT CHANGE THIS LINE OR THE TWO BELOW
673 #log# DO NOT CHANGE THIS LINE OR THE TWO BELOW -* coding: %s *-
674 #log# opts = %s
674 #log# opts = %s
675 #log# args = %s
675 #log# args = %s
676 #log# It is safe to make manual edits below here.
676 #log# It is safe to make manual edits below here.
General Comments 0
You need to be logged in to leave comments. Login now