append(): Fixing the test for convertability after consultation with
[python/dscho.git] / Lib / idlelib / Bindings.py
blob8cd7085a80855983a331163ace0c4e2fe7bfe3ee
1 # This file defines the menu contents and key bindings. Note that
2 # there is additional configuration information in the EditorWindow
3 # class (and subclasses): the menus are created there based on the
4 # menu_specs (class) variable, and menus not created are silently
5 # skipped by the code here. This makes it possible to define the
6 # Debug menu here, which is only present in the PythonShell window.
8 import sys
9 from configHandler import idleConf
11 menudefs = [
12 # underscore prefixes character to underscore
13 ('file', [
14 ('_New window', '<<open-new-window>>'),
15 ('_Open...', '<<open-window-from-file>>'),
16 ('Open _module...', '<<open-module>>'),
17 ('Class _browser', '<<open-class-browser>>'),
18 ('_Path browser', '<<open-path-browser>>'),
19 None,
20 ('_Save', '<<save-window>>'),
21 ('Save _As...', '<<save-window-as-file>>'),
22 ('Save Co_py As...', '<<save-copy-of-window-as-file>>'),
23 None,
24 ('_Print window', '<<print-window>>'),
25 None,
26 ('_Close', '<<close-window>>'),
27 ('E_xit', '<<close-all-windows>>'),
28 ]),
29 ('edit', [
30 ('_Undo', '<<undo>>'),
31 ('_Redo', '<<redo>>'),
32 None,
33 ('Cu_t', '<<cut>>'),
34 ('_Copy', '<<copy>>'),
35 ('_Paste', '<<paste>>'),
36 ('Select _All', '<<select-all>>'),
37 None,
38 ('_Find...', '<<find>>'),
39 ('Find a_gain', '<<find-again>>'),
40 ('Find _selection', '<<find-selection>>'),
41 ('Find in Files...', '<<find-in-files>>'),
42 ('R_eplace...', '<<replace>>'),
43 ('Go to _line', '<<goto-line>>'),
44 ]),
45 ('format', [
46 ('_Indent region', '<<indent-region>>'),
47 ('_Dedent region', '<<dedent-region>>'),
48 ('Comment _out region', '<<comment-region>>'),
49 ('U_ncomment region', '<<uncomment-region>>'),
50 ('Tabify region', '<<tabify-region>>'),
51 ('Untabify region', '<<untabify-region>>'),
52 ('Toggle tabs', '<<toggle-tabs>>'),
53 ('New indent width', '<<change-indentwidth>>'),
54 ]),
55 ('run',[
56 ('Python shell', '<<open-python-shell>>'),
57 ]),
58 ('debug', [
59 ('_Go to file/line', '<<goto-file-line>>'),
60 ('_Stack viewer', '<<open-stack-viewer>>'),
61 ('!_Debugger', '<<toggle-debugger>>'),
62 ('!_Auto-open stack viewer', '<<toggle-jit-stack-viewer>>' ),
63 ]),
64 ('settings', [
65 ('_Configure Idle...', '<<open-config-dialog>>'),
66 None,
67 ('Revert to _Default Settings', '<<revert-all-settings>>'),
68 ]),
69 ('help', [
70 ('_IDLE Help...', '<<help>>'),
71 ('Python _Documentation...', '<<python-docs>>'),
72 ('_Advice...', '<<good-advice>>'),
73 ('View IDLE _Readme...', '<<view-readme>>'),
74 None,
75 ('_About IDLE...', '<<about-idle>>'),
76 ]),
79 default_keydefs = idleConf.GetCurrentKeySet()
81 del sys