migration.py
branchstable
changeset 8108 91868ec92391
parent 8107 e5858a4a1244
child 8119 29cdde6bb9ef
equal deleted inserted replaced
8107:e5858a4a1244 8108:91868ec92391
   267 type "exit" or Ctrl-D to quit the shell and resume operation"""
   267 type "exit" or Ctrl-D to quit the shell and resume operation"""
   268         # give custom readfunc to avoid http://bugs.python.org/issue1288615
   268         # give custom readfunc to avoid http://bugs.python.org/issue1288615
   269         def unicode_raw_input(prompt):
   269         def unicode_raw_input(prompt):
   270             return unicode(raw_input(prompt), sys.stdin.encoding)
   270             return unicode(raw_input(prompt), sys.stdin.encoding)
   271         interact(banner, readfunc=unicode_raw_input, local=local_ctx)
   271         interact(banner, readfunc=unicode_raw_input, local=local_ctx)
   272         readline.write_history_file(histfile)
   272         try:
       
   273             readline.write_history_file(histfile)
       
   274         except IOError:
       
   275             pass
   273         # delete instance's confirm attribute to avoid questions
   276         # delete instance's confirm attribute to avoid questions
   274         del self.confirm
   277         del self.confirm
   275         self.need_wrap = True
   278         self.need_wrap = True
   276 
   279 
   277     @cached
   280     @cached