jpayne@68: README.txt: an index to idlelib files and the IDLE menu. jpayne@68: jpayne@68: IDLE is Python's Integrated Development and Learning jpayne@68: Environment. The user documentation is part of the Library Reference and jpayne@68: is available in IDLE by selecting Help => IDLE Help. This README documents jpayne@68: idlelib for IDLE developers and curious users. jpayne@68: jpayne@68: IDLELIB FILES lists files alphabetically by category, jpayne@68: with a short description of each. jpayne@68: jpayne@68: IDLE MENU show the menu tree, annotated with the module jpayne@68: or module object that implements the corresponding function. jpayne@68: jpayne@68: This file is descriptive, not prescriptive, and may have errors jpayne@68: and omissions and lag behind changes in idlelib. jpayne@68: jpayne@68: jpayne@68: IDLELIB FILES jpayne@68: Implementation files not in IDLE MENU are marked (nim). jpayne@68: Deprecated files and objects are listed separately as the end. jpayne@68: jpayne@68: Startup jpayne@68: ------- jpayne@68: __init__.py # import, does nothing jpayne@68: __main__.py # -m, starts IDLE jpayne@68: idle.bat jpayne@68: idle.py jpayne@68: idle.pyw jpayne@68: jpayne@68: Implementation jpayne@68: -------------- jpayne@68: autocomplete.py # Complete attribute names or filenames. jpayne@68: autocomplete_w.py # Display completions. jpayne@68: autoexpand.py # Expand word with previous word in file. jpayne@68: browser.py # Create module browser window. jpayne@68: calltip_w.py # Display calltip. jpayne@68: calltips.py # Create calltip text. jpayne@68: codecontext.py # Show compound statement headers otherwise not visible. jpayne@68: colorizer.py # Colorize text (nim) jpayne@68: config.py # Load, fetch, and save configuration (nim). jpayne@68: configdialog.py # Display user configuration dialogs. jpayne@68: config_help.py # Specify help source in configdialog. jpayne@68: config_key.py # Change keybindings. jpayne@68: dynoption.py # Define mutable OptionMenu widget (nim). jpayne@68: debugobj.py # Define class used in stackviewer. jpayne@68: debugobj_r.py # Communicate objects between processes with rpc (nim). jpayne@68: debugger.py # Debug code run from shell or editor; show window. jpayne@68: debugger_r.py # Debug code run in remote process. jpayne@68: delegator.py # Define base class for delegators (nim). jpayne@68: editor.py # Define most of editor and utility functions. jpayne@68: filelist.py # Open files and manage list of open windows (nim). jpayne@68: grep.py # Find all occurrences of pattern in multiple files. jpayne@68: help.py # Display IDLE's html doc. jpayne@68: help_about.py # Display About IDLE dialog. jpayne@68: history.py # Get previous or next user input in shell (nim) jpayne@68: hyperparser.py # Parse code around a given index. jpayne@68: iomenu.py # Open, read, and write files jpayne@68: macosx.py # Help IDLE run on Macs (nim). jpayne@68: mainmenu.py # Define most of IDLE menu. jpayne@68: multicall.py # Wrap tk widget to allow multiple calls per event (nim). jpayne@68: outwin.py # Create window for grep output. jpayne@68: paragraph.py # Re-wrap multiline strings and comments. jpayne@68: parenmatch.py # Match fenceposts: (), [], and {}. jpayne@68: pathbrowser.py # Create path browser window. jpayne@68: percolator.py # Manage delegator stack (nim). jpayne@68: pyparse.py # Give information on code indentation jpayne@68: pyshell.py # Start IDLE, manage shell, complete editor window jpayne@68: query.py # Query user for information jpayne@68: redirector.py # Intercept widget subcommands (for percolator) (nim). jpayne@68: replace.py # Search and replace pattern in text. jpayne@68: rpc.py # Communicate between idle and user processes (nim). jpayne@68: rstrip.py # Strip trailing whitespace. jpayne@68: run.py # Manage user code execution subprocess. jpayne@68: runscript.py # Check and run user code. jpayne@68: scrolledlist.py # Define scrolledlist widget for IDLE (nim). jpayne@68: search.py # Search for pattern in text. jpayne@68: searchbase.py # Define base for search, replace, and grep dialogs. jpayne@68: searchengine.py # Define engine for all 3 search dialogs. jpayne@68: stackviewer.py # View stack after exception. jpayne@68: statusbar.py # Define status bar for windows (nim). jpayne@68: tabbedpages.py # Define tabbed pages widget (nim). jpayne@68: textview.py # Define read-only text widget (nim). jpayne@68: tree.py # Define tree widget, used in browsers (nim). jpayne@68: undo.py # Manage undo stack. jpayne@68: windows.py # Manage window list and define listed top level. jpayne@68: zoomheight.py # Zoom window to full height of screen. jpayne@68: jpayne@68: Configuration jpayne@68: ------------- jpayne@68: config-extensions.def # Defaults for extensions jpayne@68: config-highlight.def # Defaults for colorizing jpayne@68: config-keys.def # Defaults for key bindings jpayne@68: config-main.def # Defai;ts fpr font and geneal jpayne@68: jpayne@68: Text jpayne@68: ---- jpayne@68: CREDITS.txt # not maintained, displayed by About IDLE jpayne@68: HISTORY.txt # NEWS up to July 2001 jpayne@68: NEWS.txt # commits, displayed by About IDLE jpayne@68: README.txt # this file, displayed by About IDLE jpayne@68: TODO.txt # needs review jpayne@68: extend.txt # about writing extensions jpayne@68: help.html # copy of idle.html in docs, displayed by IDLE Help jpayne@68: jpayne@68: Subdirectories jpayne@68: -------------- jpayne@68: Icons # small image files jpayne@68: idle_test # files for human test and automated unit tests jpayne@68: jpayne@68: Unused and Deprecated files and objects (nim) jpayne@68: --------------------------------------------- jpayne@68: tooltip.py # unused jpayne@68: jpayne@68: jpayne@68: jpayne@68: IDLE MENUS jpayne@68: Top level items and most submenu items are defined in mainmenu. jpayne@68: Extensions add submenu items when active. The names given are jpayne@68: found, quoted, in one of these modules, paired with a '<>'. jpayne@68: Each pseudoevent is bound to an event handler. Some event handlers jpayne@68: call another function that does the actual work. The annotations below jpayne@68: are intended to at least give the module where the actual work is done. jpayne@68: 'eEW' = editor.EditorWindow jpayne@68: jpayne@68: File jpayne@68: New File # eEW.new_callback jpayne@68: Open... # iomenu.open jpayne@68: Open Module # eEw.open_module jpayne@68: Recent Files jpayne@68: Class Browser # eEW.open_class_browser, browser.ClassBrowser jpayne@68: Path Browser # eEW.open_path_browser, pathbrowser jpayne@68: --- jpayne@68: Save # iomenu.save jpayne@68: Save As... # iomenu.save_as jpayne@68: Save Copy As... # iomenu.save_a_copy jpayne@68: --- jpayne@68: Print Window # iomenu.print_window jpayne@68: --- jpayne@68: Close # eEW.close_event jpayne@68: Exit # flist.close_all_callback (bound in eEW) jpayne@68: jpayne@68: Edit jpayne@68: Undo # undodelegator jpayne@68: Redo # undodelegator jpayne@68: --- # eEW.right_menu_event jpayne@68: Cut # eEW.cut jpayne@68: Copy # eEW.copy jpayne@68: Paste # eEW.past jpayne@68: Select All # eEW.select_all (+ see eEW.remove_selection) jpayne@68: --- # Next 5 items use searchengine; dialogs use searchbase jpayne@68: Find # eEW.find_event, search.SearchDialog.find jpayne@68: Find Again # eEW.find_again_event, sSD.find_again jpayne@68: Find Selection # eEW.find_selection_event, sSD.find_selection jpayne@68: Find in Files... # eEW.find_in_files_event, grep jpayne@68: Replace... # eEW.replace_event, replace.ReplaceDialog.replace jpayne@68: Go to Line # eEW.goto_line_event jpayne@68: Show Completions # autocomplete extension and autocompleteWidow (&HP) jpayne@68: Expand Word # autoexpand extension jpayne@68: Show call tip # Calltips extension and CalltipWindow (& Hyperparser) jpayne@68: Show surrounding parens # parenmatch (& Hyperparser) jpayne@68: jpayne@68: Shell # pyshell jpayne@68: View Last Restart # pyshell.PyShell.view_restart_mark jpayne@68: Restart Shell # pyshell.PyShell.restart_shell jpayne@68: Interrupt Execution # pyshell.PyShell.cancel_callback jpayne@68: jpayne@68: Debug (Shell only) jpayne@68: Go to File/Line jpayne@68: debugger # debugger, debugger_r, PyShell.toggle_debugger jpayne@68: Stack Viewer # stackviewer, PyShell.open_stack_viewer jpayne@68: Auto-open Stack Viewer # stackviewer jpayne@68: jpayne@68: Format (Editor only) jpayne@68: Indent Region # eEW.indent_region_event jpayne@68: Dedent Region # eEW.dedent_region_event jpayne@68: Comment Out Reg. # eEW.comment_region_event jpayne@68: Uncomment Region # eEW.uncomment_region_event jpayne@68: Tabify Region # eEW.tabify_region_event jpayne@68: Untabify Region # eEW.untabify_region_event jpayne@68: Toggle Tabs # eEW.toggle_tabs_event jpayne@68: New Indent Width # eEW.change_indentwidth_event jpayne@68: Format Paragraph # paragraph extension jpayne@68: --- jpayne@68: Strip tailing whitespace # rstrip extension jpayne@68: jpayne@68: Run (Editor only) jpayne@68: Python Shell # pyshell jpayne@68: --- jpayne@68: Check Module # runscript jpayne@68: Run Module # runscript jpayne@68: jpayne@68: Options jpayne@68: Configure IDLE # eEW.config_dialog, configdialog jpayne@68: (tabs in the dialog) jpayne@68: Font tab # config-main.def jpayne@68: Highlight tab # query, config-highlight.def jpayne@68: Keys tab # query, config_key, config_keys.def jpayne@68: General tab # config_help, config-main.def jpayne@68: Extensions tab # config-extensions.def, corresponding .py jpayne@68: --- jpayne@68: Code Context (ed)# codecontext extension jpayne@68: jpayne@68: Window jpayne@68: Zoomheight # zoomheight extension jpayne@68: --- jpayne@68: # windows jpayne@68: jpayne@68: Help jpayne@68: About IDLE # eEW.about_dialog, help_about.AboutDialog jpayne@68: --- jpayne@68: IDLE Help # eEW.help_dialog, helpshow_idlehelp jpayne@68: Python Doc # eEW.python_docs jpayne@68: Turtle Demo # eEW.open_turtle_demo jpayne@68: --- jpayne@68: jpayne@68: jpayne@68: (right click) jpayne@68: Defined in editor, PyShelpyshellut jpayne@68: Cut jpayne@68: Copy jpayne@68: Paste jpayne@68: --- jpayne@68: Go to file/line (shell and output only) jpayne@68: Set Breakpoint (editor only) jpayne@68: Clear Breakpoint (editor only) jpayne@68: Defined in debugger jpayne@68: Go to source line jpayne@68: Show stack frame jpayne@68: jpayne@68: jpayne@68: Center Insert # eEW.center_insert_event jpayne@68: jpayne@68: jpayne@68: CODE STYLE -- Generally PEP 8. jpayne@68: jpayne@68: import jpayne@68: ------ jpayne@68: Put import at the top, unless there is a good reason otherwise. jpayne@68: PEP 8 says to group stdlib, 3rd-party dependencies, and package imports. jpayne@68: For idlelib, the groups are general stdlib, tkinter, and idlelib. jpayne@68: Sort modules within each group, except that tkinter.ttk follows tkinter. jpayne@68: Sort 'from idlelib import mod1' and 'from idlelib.mod2 import object' jpayne@68: together by module, ignoring within module objects. jpayne@68: Put 'import __main__' after other idlelib imports. jpayne@68: jpayne@68: Imports only needed for testing are put not at the top but in an jpayne@68: htest function def or "if __name__ == '__main__'" clause. jpayne@68: jpayne@68: Within module imports like "from idlelib.mod import class" may cause jpayne@68: circular imports to deadlock. Even without this, circular imports may jpayne@68: require at least one of the imports to be delayed until a function call.