code: def replay_sync(self, live=False):
          'Replay all commands in log.'
          self.cursorRowIndex = 0
          CommandLog.currentReplay = self
          with Progress(total=len(self.rows)) as prog:
              while self.cursorRowIndex < len(self.rows):
                  if CommandLog.currentReplay is None:
                      status('replay canceled')
                      return
  
                  vd().statuses.clear()
                  try:
                      if self.replayOne(self.cursorRow):
                          self.cancel()
                          return
                  except Exception as e:
                      self.cancel()
                      exceptionCaught(e)
                      status('replay canceled')
                      return
  
                  self.cursorRowIndex += 1
                  prog.addProgress(1)
  
                  sync(1 if live else 0)  # expect this thread also if playing live
                  while not self.delay():
                      pass
  
          status('replay complete')
          CommandLog.currentReplay = Nonf replay_sync(self, live=False):
          'Replay all commands in log.'
          self.cursorRowIndex = 0
          CommandLog.currentReplay = self
          with Progress(total=len(self.rows)) as prog:
              while self.cursorRowIndex < len(self.rows):
                  if CommandLog.currentReplay is None:
                      status('replay canceled')
                      return
  
                  vd().statuses.clear()
                  try:
                      if self.replayOne(self.cursorRow):
                          self.cancel()
                          return
                  except Exception as e:
                      self.cancel()
                      exceptionCaught(e)
                      status('replay canceled')
                      return
  
                  self.cursorRowIndex += 1
                  prog.addProgress(1)
  
                  sync(1 if live else 0)  # expect this thread also if playing live
                  while not self.delay():
                      pass
  
          status('replay complete')
          CommandLog.currentReplay = None
docs: Replay all commands in log.