Example #1
0
 def write_file(self, filename=None, raise_exc=False):
     """Save a readline history file.
     The default filename is ~/.history. If ``raise_exc`` is True,
     IOErrors will be allowed to propagate.
     """
     try:
         readline.write_history_file(filename)
     except IOError:
         if raise_exc:
             raise
Example #2
0
 def write_file(self, filename=None, raise_exc=False):
     """Save a readline history file.
     The default filename is ~/.history. If ``raise_exc`` is True,
     IOErrors will be allowed to propagate.
     """
     try:
         readline.write_history_file(filename)
     except IOError:
         if raise_exc:
             raise
Example #3
0
 def test_write_history_file_None(self):
     readline.write_history_file(None)
     self.assertTrue(isfile(self.histfile))
Example #4
0
 def test_write_history_file_noarg(self):
     readline.write_history_file()
     self.assertTrue(isfile(self.histfile))
Example #5
0
 def test_write_history_file_None(self):
     readline.write_history_file(None)
     self.assertTrue(isfile(self.histfile))
Example #6
0
 def test_write_history_file_noarg(self):
     readline.write_history_file()
     self.assertTrue(isfile(self.histfile))