parameters: (self, first, count)
return_statement: return scribus.deleteText(self.__identifier)
docstring: Precondition: The object with the unique identifier “textFrame”
          (constructor argument) currently exists in the current document,
          and it refers to a text frame. “first” and “count” are non-negative
          integers. The requested range exists really.
          Postcondition: Starting from index “first”, the number of
          “count” indexes are removed. Note that the indexes are the
          indexes provides by
          scribus. This may not be unicode characters, but UTF16 code units, and
          if you choose half a surrogate pair, scribus will silently add the
          missing half surrogate pair. The indexes does not refer to the actual
          text content of “textFrame”, but to the content of the underlying
          “story”, that means the common text content that is shared between
          this text frame and all linked text frames. Note that this function
          will (likely) change the current text selection of the story.
docstring_summary: Precondition: The object with the unique identifier “textFrame”
          (constructor argument) currently exists in the current document,
          and it refers to a text frame. “first” and “count” are non-negative
          integers. The requested range exists really.
          Postcondition: Starting from index “first”, the number of
          “count” indexes are removed. Note that the indexes are the
          indexes provides by
          scribus. This may not be unicode characters, but UTF16 code units, and
          if you choose half a surrogate pair, scribus will silently add the
          missing half surrogate pair. The indexes does not refer to the actual
          text content of “textFrame”, but to the content of the underlying
          “story”, that means the common text content that is shared between
          this text frame and all linked text frames. Note that this function
          will (likely) change the current text selection of the story.
docstring_tokens: Precondition : The object with the unique identifier “textFrame” ( constructor argument ) currently exists in the current document and it refers to a text frame . “first” and “count” are non - negative integers . The requested range exists really . Postcondition : Starting from index “first” the number of “count” indexes are removed . Note that the indexes are the indexes provides by scribus . This may not be unicode characters but UTF16 code units and if you choose half a surrogate pair scribus will silently add the missing half surrogate pair . The indexes does not refer to the actual text content of “textFrame” but to the content of the underlying “story” that means the common text content that is shared between this text frame and all linked text frames . Note that this function will ( likely ) change the current text selection of the story .
function: def delete_text(self, first, count):
          """Precondition: The object with the unique identifier “textFrame”
          (constructor argument) currently exists in the current document,
          and it refers to a text frame. “first” and “count” are non-negative
          integers. The requested range exists really.
          Postcondition: Starting from index “first”, the number of
          “count” indexes are removed. Note that the indexes are the
          indexes provides by
          scribus. This may not be unicode characters, but UTF16 code units, and
          if you choose half a surrogate pair, scribus will silently add the
          missing half surrogate pair. The indexes does not refer to the actual
          text content of “textFrame”, but to the content of the underlying
          “story”, that means the common text content that is shared between
          this text frame and all linked text frames. Note that this function
          will (likely) change the current text selection of the story."""
          if (type(first) is not int) or (type(count) is not int):
              raise TypeError("Both arguments, “first” and “count”, must be "
                              "integers, but they aren’t.")
          if (first < 0) or (count < 0):
              raise IndexError("Both arguments, “first” and “count”, must"
                               "not be negative, but they are.")
          if scribus.getObjectType(self.__identifier) != "TextFrame":
              raise RuntimeError("The argument “textFrame” that was given in "
                                 "the constructor does currently not refer to "
                                 "a text frame in the current document.")
          # If count is 0, scribus.selectText will select nothing. But when
          # nothing is selected, scribus.deleteText will delete the
          # hole content of the story. That is not what we
          # expect, so we have to catch this case manually.
          if count == 0:
              if first >= self.length():
                  raise IndexError("“first” is out of range.")
              return
          scribus.selectText(first, count, self.__identifier)
          return scribus.deleteText(self.__identifier)
function_tokens: def delete_text ( self , first , count ) : if ( type ( first ) is not int ) or ( type ( count ) is not int ) : raise TypeError ( "Both arguments, “first” and “count”, must be " "integers, but they aren’t.") if ( first < 0 ) or ( count < 0 ) : raise IndexError ( "Both arguments, “first” and “count”, must" "not be negative, but they are." ) if scribus . getObjectType ( self . __identifier ) != "TextFrame" : raise RuntimeError ( "The argument “textFrame” that was given in " "the constructor does currently not refer to " "a text frame in the current document." ) # If count is 0, scribus.selectText will select nothing. But when # nothing is selected, scribus.deleteText will delete the # hole content of the story. That is not what we # expect, so we have to catch this case manually. if count == 0 : if first >= self . length ( ) : raise IndexError ( "“first” is out of range.") return scribus . selectText ( first , count , self . __identifier ) return scribus . deleteText ( self . __identifier )