MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _editor_window

Function _editor_window

tools/python-3.11.9-amd64/Lib/idlelib/editor.py:1743–1759  ·  view source on GitHub ↗
(parent)

Source from the content-addressed store, hash-verified

1741
1742
1743def _editor_window(parent): # htest #
1744 # error if close master window first - timer event, after script
1745 root = parent
1746 fixwordbreaks(root)
1747 if sys.argv[1:]:
1748 filename = sys.argv[1]
1749 else:
1750 filename = None
1751 macosx.setupApp(root, None)
1752 edit = EditorWindow(root=root, filename=filename)
1753 text = edit.text
1754 text['height'] = 10
1755 for i in range(20):
1756 text.insert('insert', ' '*i + str(i) + '\n')
1757 # text.bind("<<close-all-windows>>", edit.close_event)
1758 # Does not stop error, neither does following
1759 # edit.text.bind("<<close-window>>", edit.close_event)
1760
1761
1762if __name__ == '__main__':

Callers

nothing calls this directly

Calls 4

fixwordbreaksFunction · 0.85
EditorWindowClass · 0.85
strFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected