##// END OF EJS Templates
convert backtick to repr
Matthias BUSSONNIER -
Show More
@@ -455,7 +455,7 b' class Pdb(OldPdb):'
455 455 else:
456 456 first = max(1, int(x) - 5)
457 457 except:
458 print '*** Error in argument:', `arg`
458 print '*** Error in argument:', repr(arg)
459 459 return
460 460 elif self.lineno is None:
461 461 first = max(1, self.curframe.f_lineno - 5)
@@ -188,7 +188,7 b' class DisplayHook(Configurable):'
188 188 if result is not self.shell.user_ns['_oh']:
189 189 if len(self.shell.user_ns['_oh']) >= self.cache_size and self.do_full_cache:
190 190 warn('Output cache limit (currently '+
191 `self.cache_size`+' entries) hit.\n'
191 repr(self.cache_size)+' entries) hit.\n'
192 192 'Flushing cache and resetting history counter...\n'
193 193 'The only history variables available will be _,__,___ and _1\n'
194 194 'with the current result.')
@@ -208,7 +208,7 b' class DisplayHook(Configurable):'
208 208 # hackish access to top-level namespace to create _1,_2... dynamically
209 209 to_main = {}
210 210 if self.do_full_cache:
211 new_result = '_'+`self.prompt_count`
211 new_result = '_'+repr(self.prompt_count)
212 212 to_main[new_result] = result
213 213 self.shell.push(to_main, interactive=False)
214 214 self.shell.user_ns['_oh'][self.prompt_count] = result
@@ -248,7 +248,7 b' class DisplayHook(Configurable):'
248 248 # delete auto-generated vars from global namespace
249 249
250 250 for n in range(1,self.prompt_count + 1):
251 key = '_'+`n`
251 key = '_'+repr(n)
252 252 try:
253 253 del self.shell.user_ns[key]
254 254 except: pass
@@ -117,7 +117,7 b' class Logger(object):'
117 117 for f in old:
118 118 root, ext = os.path.splitext(f)
119 119 num = int(ext[1:-1])+1
120 os.rename(f, root+'.'+`num`.zfill(3)+'~')
120 os.rename(f, root+'.'+repr(num).zfill(3)+'~')
121 121 os.rename(self.logfname, self.logfname+'.001~')
122 122 self.logfile = io.open(self.logfname, 'w', encoding='utf-8')
123 123
@@ -254,14 +254,14 b' python-profiler package from non-free.""")'
254 254 dump_file = unquote_filename(dump_file)
255 255 prof.dump_stats(dump_file)
256 256 print '\n*** Profile stats marshalled to file',\
257 `dump_file`+'.',sys_exit
257 repr(dump_file)+'.',sys_exit
258 258 if text_file:
259 259 text_file = unquote_filename(text_file)
260 260 pfile = open(text_file,'w')
261 261 pfile.write(output)
262 262 pfile.close()
263 263 print '\n*** Profile printout saved to text file',\
264 `text_file`+'.',sys_exit
264 repr(text_file)+'.',sys_exit
265 265
266 266 if opts.has_key('r'):
267 267 return stats
@@ -250,7 +250,7 b' def page_file(fname, start=0, pager_cmd=None):'
250 250 start -= 1
251 251 page(open(fname).read(),start)
252 252 except:
253 print 'Unable to show file',`fname`
253 print 'Unable to show file',repr(fname)
254 254
255 255
256 256 def get_pager_cmd(pager_cmd=None):
General Comments 0
You need to be logged in to leave comments. Login now