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