##// END OF EJS Templates
Convert str_to_unicode to str function call.
Srinivas Reddy Thatiparthy -
Show More
@@ -18,7 +18,6 b' import io'
18 18 import os
19 19 import time
20 20
21 from IPython.utils.py3compat import str_to_unicode
22 21
23 22 #****************************************************************************
24 23 # FIXME: This class isn't a mixin anymore, but it still needs attributes from
@@ -193,8 +192,8 b' which already exists. But you must first start the logging process with'
193 192 write = self.logfile.write
194 193 if kind=='input':
195 194 if self.timestamp:
196 write(str_to_unicode(time.strftime('# %a, %d %b %Y %H:%M:%S\n',
197 time.localtime())))
195 write(str(time.strftime('# %a, %d %b %Y %H:%M:%S\n',
196 time.localtime())))
198 197 write(data)
199 198 elif kind=='output' and self.log_output:
200 199 odata = u'\n'.join([u'#[Out]# %s' % s
@@ -19,7 +19,6 b' import sys'
19 19 # Our own packages
20 20 from IPython.core.magic import Magics, magics_class, line_magic
21 21 from warnings import warn
22 from IPython.utils.py3compat import str_to_unicode
23 22
24 23 #-----------------------------------------------------------------------------
25 24 # Magic implementation classes
@@ -138,7 +137,7 b' class LoggingMagics(Magics):'
138 137 for n in range(1,len(input_hist)-1):
139 138 log_write(input_hist[n].rstrip() + u'\n')
140 139 if n in output_hist:
141 log_write(str_to_unicode(repr(output_hist[n])),'output')
140 log_write(str(repr(output_hist[n])),'output')
142 141 else:
143 142 logger.log_write(u'\n'.join(input_hist[1:]))
144 143 logger.log_write(u'\n')
@@ -121,7 +121,7 b' def test_list_profiles_in():'
121 121 # No need to remove these directories and files, as they will get nuked in
122 122 # the module-level teardown.
123 123 td = tempfile.mkdtemp(dir=TMP_TEST_DIR)
124 td = py3compat.str_to_unicode(td)
124 td = str(td)
125 125 for name in ('profile_foo', 'profile_hello', 'not_a_profile'):
126 126 os.mkdir(os.path.join(td, name))
127 127 if dec.unicode_paths:
@@ -161,4 +161,4 b' def test_profile_create_ipython_dir():'
161 161 assert os.path.exists(profile_dir)
162 162 ipython_config = os.path.join(profile_dir, 'ipython_config.py')
163 163 assert os.path.exists(ipython_config)
164 No newline at end of file
164
@@ -26,7 +26,7 b' def get_pasted_lines(sentinel, l_input=py3compat.input, quiet=False):'
26 26 prompt = ""
27 27 while True:
28 28 try:
29 l = py3compat.str_to_unicode(l_input(prompt))
29 l = str(l_input(prompt))
30 30 if l == sentinel:
31 31 return
32 32 else:
General Comments 0
You need to be logged in to leave comments. Login now