README.txt 9.5 KB

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