• Home
Name Date Size #Lines LOC

..--

Icons/07-Sep-2024-148

idle_test/07-Sep-2024-13,89510,424

CREDITS.txtD07-Sep-20241.8 KiB3827

ChangeLogD07-Sep-202455 KiB1,5921,068

HISTORY.txtD07-Sep-202410.1 KiB297193

NEWS.txtD07-Sep-202449.9 KiB1,244877

NEWS2x.txtD07-Sep-202426.5 KiB661441

README.txtD07-Sep-20249.4 KiB252220

TODO.txtD07-Sep-20248.3 KiB211162

__init__.pyD07-Sep-2024396 118

__main__.pyD07-Sep-2024159 96

autocomplete.pyD07-Sep-20249.1 KiB229182

autocomplete_w.pyD07-Sep-202420.6 KiB503376

autoexpand.pyD07-Sep-20243.1 KiB9783

browser.pyD07-Sep-20248.1 KiB250196

calltip.pyD07-Sep-20247.1 KiB206148

calltip_w.pyD07-Sep-20247 KiB202153

codecontext.pyD07-Sep-202411.2 KiB271212

colorizer.pyD07-Sep-202414.4 KiB385317

config-extensions.defD07-Sep-20242.2 KiB6356

config-highlight.defD07-Sep-20242.8 KiB106102

config-keys.defD07-Sep-202410.7 KiB310304

config-main.defD07-Sep-20243.1 KiB9485

config.pyD07-Sep-202437.3 KiB912767

config_key.pyD07-Sep-202414.2 KiB328280

configdialog.pyD07-Sep-2024103.3 KiB2,4152,012

debugger.pyD07-Sep-202418.7 KiB551423

debugger_r.pyD07-Sep-202411.9 KiB394272

debugobj.pyD07-Sep-20244 KiB143119

debugobj_r.pyD07-Sep-20241.1 KiB4228

delegator.pyD07-Sep-20241 KiB3424

dynoption.pyD07-Sep-20242 KiB5948

editor.pyD07-Sep-202464.3 KiB1,6731,315

extend.txtD07-Sep-20243.5 KiB8465

filelist.pyD07-Sep-20243.8 KiB132111

format.pyD07-Sep-202415.4 KiB427340

grep.pyD07-Sep-20247.3 KiB222179

help.htmlD07-Sep-202467.7 KiB1,020978

help.pyD07-Sep-202411.6 KiB295248

help_about.pyD07-Sep-20248.8 KiB210171

history.pyD07-Sep-20244 KiB10793

hyperparser.pyD07-Sep-202412.6 KiB313204

idle.batD07-Sep-2024177 54

idle.pyD07-Sep-2024454 157

idle.pywD07-Sep-2024570 1817

iomenu.pyD07-Sep-202415.4 KiB435364

macosx.pyD07-Sep-20249.4 KiB288205

mainmenu.pyD07-Sep-20243.8 KiB126102

multicall.pyD07-Sep-202418.2 KiB449354

outwin.pyD07-Sep-20245.6 KiB188141

parenmatch.pyD07-Sep-20247 KiB184137

pathbrowser.pyD07-Sep-20243.1 KiB11290

percolator.pyD07-Sep-20243.5 KiB11992

pyparse.pyD07-Sep-202419.5 KiB594425

pyshell.pyD07-Sep-202461.4 KiB1,7131,382

query.pyD07-Sep-202414.7 KiB393314

redirector.pyD07-Sep-20246.7 KiB175138

replace.pyD07-Sep-20249.9 KiB311263

rpc.pyD07-Sep-202420.6 KiB636513

run.pyD07-Sep-202421.1 KiB645526

runscript.pyD07-Sep-20248.1 KiB214177

scrolledlist.pyD07-Sep-20244.4 KiB150118

search.pyD07-Sep-20245.4 KiB165133

searchbase.pyD07-Sep-20247.7 KiB211174

searchengine.pyD07-Sep-20247.2 KiB235194

sidebar.pyD07-Sep-202419.9 KiB548408

squeezer.pyD07-Sep-202412.5 KiB346234

stackviewer.pyD07-Sep-20244.3 KiB156125

statusbar.pyD07-Sep-20241.4 KiB5140

textview.pyD07-Sep-20246.7 KiB194149

tooltip.pyD07-Sep-20246.4 KiB187138

tree.pyD07-Sep-202416 KiB501405

undo.pyD07-Sep-202410.8 KiB367260

window.pyD07-Sep-20242.6 KiB9971

zoomheight.pyD07-Sep-20244.1 KiB12573

zzdummy.pyD07-Sep-20242 KiB7453

README.txt

1README.txt: an index to idlelib files and the IDLE menu.
2
3IDLE is Python's Integrated Development and Learning
4Environment.  The user documentation is part of the Library Reference and
5is available in IDLE by selecting Help => IDLE Help.  This README documents
6idlelib for IDLE developers and curious users.
7
8IDLELIB FILES lists files alphabetically by category,
9with a short description of each.
10
11IDLE MENU show the menu tree, annotated with the module
12or module object that implements the corresponding function.
13
14This file is descriptive, not prescriptive, and may have errors
15and omissions and lag behind changes in idlelib.
16
17
18IDLELIB FILES
19Implementation files not in IDLE MENU are marked (nim).
20Deprecated files and objects are listed separately as the end.
21
22Startup
23-------
24__init__.py  # import, does nothing
25__main__.py  # -m, starts IDLE
26idle.bat
27idle.py
28idle.pyw
29
30Implementation
31--------------
32autocomplete.py   # Complete attribute names or filenames.
33autocomplete_w.py # Display completions.
34autoexpand.py     # Expand word with previous word in file.
35browser.py        # Create module browser window.
36calltip_w.py      # Display calltip.
37calltips.py       # Create calltip text.
38codecontext.py    # Show compound statement headers otherwise not visible.
39colorizer.py      # Colorize text (nim)
40config.py         # Load, fetch, and save configuration (nim).
41configdialog.py   # Display user configuration dialogs.
42config_help.py    # Specify help source in configdialog.
43config_key.py     # Change keybindings.
44dynoption.py      # Define mutable OptionMenu widget (nim).
45debugobj.py       # Define class used in stackviewer.
46debugobj_r.py     # Communicate objects between processes with rpc (nim).
47debugger.py       # Debug code run from shell or editor; show window.
48debugger_r.py     # Debug code run in remote process.
49delegator.py      # Define base class for delegators (nim).
50editor.py         # Define most of editor and utility functions.
51filelist.py       # Open files and manage list of open windows (nim).
52grep.py           # Find all occurrences of pattern in multiple files.
53help.py           # Display IDLE's html doc.
54help_about.py     # Display About IDLE dialog.
55history.py        # Get previous or next user input in shell (nim)
56hyperparser.py    # Parse code around a given index.
57iomenu.py         # Open, read, and write files
58macosx.py         # Help IDLE run on Macs (nim).
59mainmenu.py       # Define most of IDLE menu.
60multicall.py      # Wrap tk widget to allow multiple calls per event (nim).
61outwin.py         # Create window for grep output.
62paragraph.py      # Re-wrap multiline strings and comments.
63parenmatch.py     # Match fenceposts: (), [], and {}.
64pathbrowser.py    # Create path browser window.
65percolator.py     # Manage delegator stack (nim).
66pyparse.py        # Give information on code indentation
67pyshell.py        # Start IDLE, manage shell, complete editor window
68query.py          # Query user for information
69redirector.py     # Intercept widget subcommands (for percolator) (nim).
70replace.py        # Search and replace pattern in text.
71rpc.py            # Communicate between idle and user processes (nim).
72rstrip.py         # Strip trailing whitespace.
73run.py            # Manage user code execution subprocess.
74runscript.py      # Check and run user code.
75scrolledlist.py   # Define scrolledlist widget for IDLE (nim).
76search.py         # Search for pattern in text.
77searchbase.py     # Define base for search, replace, and grep dialogs.
78searchengine.py   # Define engine for all 3 search dialogs.
79stackviewer.py    # View stack after exception.
80statusbar.py      # Define status bar for windows (nim).
81tabbedpages.py    # Define tabbed pages widget (nim).
82textview.py       # Define read-only text widget (nim).
83tree.py           # Define tree widget, used in browsers (nim).
84undo.py           # Manage undo stack.
85windows.py        # Manage window list and define listed top level.
86zoomheight.py     # Zoom window to full height of screen.
87
88Configuration
89-------------
90config-extensions.def # Defaults for extensions
91config-highlight.def  # Defaults for colorizing
92config-keys.def       # Defaults for key bindings
93config-main.def       # Defaults for font and general tabs
94
95Text
96----
97CREDITS.txt  # not maintained, displayed by About IDLE
98HISTORY.txt  # NEWS up to July 2001
99NEWS.txt     # commits, displayed by About IDLE
100README.txt   # this file, displayed by About IDLE
101TODO.txt     # needs review
102extend.txt   # about writing extensions
103help.html    # copy of idle.html in docs, displayed by IDLE Help
104
105Subdirectories
106--------------
107Icons        # small image files
108idle_test    # files for human test and automated unit tests
109
110Unused and Deprecated files and objects (nim)
111---------------------------------------------
112tooltip.py # unused
113
114
115
116IDLE MENUS
117Top level items and most submenu items are defined in mainmenu.
118Extensions add submenu items when active.  The names given are
119found, quoted, in one of these modules, paired with a '<<pseudoevent>>'.
120Each pseudoevent is bound to an event handler.  Some event handlers
121call another function that does the actual work.  The annotations below
122are intended to at least give the module where the actual work is done.
123'eEW' = editor.EditorWindow
124
125File
126  New File         # eEW.new_callback
127  Open...          # iomenu.open
128  Open Module      # eEw.open_module
129  Recent Files
130  Class Browser    # eEW.open_class_browser, browser.ClassBrowser
131  Path Browser     # eEW.open_path_browser, pathbrowser
132  ---
133  Save             # iomenu.save
134  Save As...       # iomenu.save_as
135  Save Copy As...  # iomenu.save_a_copy
136  ---
137  Print Window     # iomenu.print_window
138  ---
139  Close            # eEW.close_event
140  Exit             # flist.close_all_callback (bound in eEW)
141
142Edit
143  Undo             # undodelegator
144  Redo             # undodelegator
145  ---              # eEW.right_menu_event
146  Cut              # eEW.cut
147  Copy             # eEW.copy
148  Paste            # eEW.past
149  Select All       # eEW.select_all (+ see eEW.remove_selection)
150  ---              # Next 5 items use searchengine; dialogs use searchbase
151  Find             # eEW.find_event, search.SearchDialog.find
152  Find Again       # eEW.find_again_event, sSD.find_again
153  Find Selection   # eEW.find_selection_event, sSD.find_selection
154  Find in Files... # eEW.find_in_files_event, grep
155  Replace...       # eEW.replace_event, replace.ReplaceDialog.replace
156  Go to Line       # eEW.goto_line_event
157  Show Completions # autocomplete extension and autocompleteWidow (&HP)
158  Expand Word      # autoexpand extension
159  Show call tip    # Calltips extension and CalltipWindow (& Hyperparser)
160  Show surrounding parens  # parenmatch (& Hyperparser)
161
162Shell  # pyshell
163  View Last Restart    # pyshell.PyShell.view_restart_mark
164  Restart Shell        # pyshell.PyShell.restart_shell
165  Interrupt Execution  # pyshell.PyShell.cancel_callback
166
167Debug (Shell only)
168  Go to File/Line
169  debugger         # debugger, debugger_r, PyShell.toggle_debugger
170  Stack Viewer     # stackviewer, PyShell.open_stack_viewer
171  Auto-open Stack Viewer  # stackviewer
172
173Format (Editor only)
174  Indent Region    # eEW.indent_region_event
175  Dedent Region    # eEW.dedent_region_event
176  Comment Out Reg. # eEW.comment_region_event
177  Uncomment Region # eEW.uncomment_region_event
178  Tabify Region    # eEW.tabify_region_event
179  Untabify Region  # eEW.untabify_region_event
180  Toggle Tabs      # eEW.toggle_tabs_event
181  New Indent Width # eEW.change_indentwidth_event
182  Format Paragraph # paragraph extension
183  ---
184  Strip tailing whitespace  # rstrip extension
185
186Run (Editor only)
187  Python Shell     # pyshell
188  ---
189  Check Module     # runscript
190  Run Module       # runscript
191
192Options
193  Configure IDLE   # eEW.config_dialog, configdialog
194    (tabs in the dialog)
195    Font tab       # config-main.def
196    Highlight tab  # query, config-highlight.def
197    Keys tab       # query, config_key, config_keys.def
198    General tab    # config_help, config-main.def
199    Extensions tab # config-extensions.def, corresponding .py
200  ---
201  Code Context (ed)# codecontext extension
202
203Window
204  Zoomheight       # zoomheight extension
205  ---
206  <open windows>   # windows
207
208Help
209  About IDLE       # eEW.about_dialog, help_about.AboutDialog
210  ---
211  IDLE Help        # eEW.help_dialog, helpshow_idlehelp
212  Python Doc       # eEW.python_docs
213  Turtle Demo      # eEW.open_turtle_demo
214  ---
215  <other help sources>
216
217<Context Menu> (right click)
218  Defined in editor, PyShelpyshellut
219    Cut
220    Copy
221    Paste
222    ---
223    Go to file/line (shell and output only)
224    Set Breakpoint (editor only)
225    Clear Breakpoint (editor only)
226  Defined in debugger
227    Go to source line
228    Show stack frame
229
230<No menu>
231Center Insert      # eEW.center_insert_event
232
233
234CODE STYLE -- Generally PEP 8.
235
236import
237------
238Put import at the top, unless there is a good reason otherwise.
239PEP 8 says to group stdlib, 3rd-party dependencies, and package imports.
240For idlelib, the groups are general stdlib, tkinter, and idlelib.
241Sort modules within each group, except that tkinter.ttk follows tkinter.
242Sort 'from idlelib import mod1' and 'from idlelib.mod2 import object'
243together by module, ignoring within module objects.
244Put 'import __main__' after other idlelib imports.
245
246Imports only needed for testing are put not at the top but in an
247htest function def or "if __name__ == '__main__'" clause.
248
249Within module imports like "from idlelib.mod import class" may cause
250circular imports to deadlock.  Even without this, circular imports may
251require at least one of the imports to be delayed until a function call.
252