def revert_cmd(self): """Implements the standard Revert command. Discards the current contents of the document and re-reads it from the associated file.""" if self._file != None: if confirm( 'Revert to the last saved version of "%s"?' % self.title, "Revert", "Cancel"): self.destroy_contents() self.read()
def check(self): path = self.get_filename() #print "_SaveFileDialog.ok: checking path %r" % path ### #if path is None: # return False if not os.path.exists(path): return True else: result = confirm("Replace existing '%s'?" % os.path.basename(path), "Cancel", "Replace", cancel = None) return result == 0
def check(self): path = self.get_filename() #print "_SaveFileDialog.ok: checking path %r" % path ### #if path is None: # return False if not os.path.exists(path): return True else: result = confirm("Replace existing '%s'?" % os.path.basename(path), "Cancel", "Replace", cancel=None) return result == 0
def do_confirm(): say("Doing confirm") result = confirm("Attack Orpuddex?") say("Result =", result)