def cuttext(self, window_name, object_name, start_position, end_position=-<NUM_LIT:1>):
object_handle = self._get_object_handle(window_name, object_name)<EOL>if not object_handle.AXEnabled:<EOL><INDENT>raise LdtpServerException(u"<STR_LIT>" % object_name)<EOL><DEDENT>size = object_handle.AXNumberOfCharacters<EOL>if end_position == -<NUM_LIT:1> or end_position > size:<EOL><INDENT>end_position = size<EOL><DEDENT>if start_position < <NUM_LIT:0>:<EOL><INDENT>start_position = <NUM_LIT:0><EOL><DEDENT>data = object_handle.AXValue<EOL>Clipboard.copy(data[start_position:end_position])<EOL>object_handle.AXValue = data[:start_position] + data[end_position:]<EOL>return <NUM_LIT:1><EOL>
cut text from start position to end position

@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob. 
@type object_name: string
@param start_position: Start position
@type object_name: integer
@param end_position: End position, default -1
Cut all the text from start position till end
@type object_name: integer

@return: 1 on success.
@rtype: integer