这是关于来自 python/IDLE 的 Text 小部件方法的帮助内容,名为:dump
| dump(self, index1, index2=None, command=None, **kw)
| Return the contents of the widget between index1 and index2.
|
| The type of contents returned in filtered based on the keyword
| parameters; if 'all', 'image', 'mark', 'tag', 'text', or 'window' are
| given and true, then the corresponding items are returned. The result
| is a list of triples of the form (key, value, index). If none of the
| keywords are true then 'all' is used by default.
|
| If the 'command' argument is given, it is called once for each element
| of the list of triples, with the values of each triple serving as the
| arguments to the function. In this case the list is not returned.
我只能完成这项工作(下)。不知道如何为其添加参数。我的意思是“标记”、“标签”、“文本”等。
myText.dump("sel.first","sel.last"):