code: def do(self, text):
      self.marks_before = self.save_marks(text)
      self.index1 = text.index(self.index1)
      if self.index2:
          self.index2 = text.index(self.index2)
      else:
          self.index2 = text.index(self.index1 + " +1c")
      if text.compare(self.index2, ">", "end-1c"):
          # Don't delete the final newline
          self.index2 = text.index("end-1c")
      self.chars = text.get(self.index1, self.index2)
      text.delete(self.index1, self.index2)
      self.marks_after = self.save_marks(text)
  
imports: import string
  from idlelib.delegator import Delegator
label_desc: Use image node_id 2 for calling the DeleteCommand obj's underlying member method code with example usage: obj.do(text) without return types