Fix the availability statement for the spawn*() functions to reflect the
[python/dscho.git] / Lib / idlelib / Bindings.py
blob1a8374b3fa15b748e81f8c2698c1a4037a3873c6
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 # changes by dscherer@cmu.edu:
9 # - Python shell moved to 'Run' menu
10 # - "Help" renamed to "IDLE Help" to distinguish from Python help.
11 # The distinction between the environment and the language is dim
12 # or nonexistent in a novice's mind.
13 # - Silly advice added
15 import sys
16 import string
17 #from keydefs import *
18 from configHandler import idleConf
20 menudefs = [
21 # underscore prefixes character to underscore
22 ('file', [
23 ('_New window', '<<open-new-window>>'),
24 ('_Open...', '<<open-window-from-file>>'),
25 ('Open _module...', '<<open-module>>'),
26 ('Class _browser', '<<open-class-browser>>'),
27 ('_Path browser', '<<open-path-browser>>'),
28 None,
29 ('_Save', '<<save-window>>'),
30 ('Save _As...', '<<save-window-as-file>>'),
31 ('Save Co_py As...', '<<save-copy-of-window-as-file>>'),
32 None,
33 ('_Close', '<<close-window>>'),
34 ('E_xit', '<<close-all-windows>>'),
35 ]),
36 ('edit', [
37 ('_Undo', '<<undo>>'),
38 ('_Redo', '<<redo>>'),
39 None,
40 ('Cu_t', '<<Cut>>'),
41 ('_Copy', '<<Copy>>'),
42 ('_Paste', '<<Paste>>'),
43 ('Select _All', '<<select-all>>'),
44 ]),
45 ('run',[
46 ('Python shell', '<<open-python-shell>>'),
47 ]),
48 ('debug', [
49 ('_Go to file/line', '<<goto-file-line>>'),
50 ('_Stack viewer', '<<open-stack-viewer>>'),
51 ('!_Debugger', '<<toggle-debugger>>'),
52 ('!_Auto-open stack viewer', '<<toggle-jit-stack-viewer>>' ),
53 ]),
54 # ('settings', [
55 # ('_Configure Idle...', '<<open-config-dialog>>'),
56 # None,
57 # ('Revert to _Default Settings', '<<revert-all-settings>>'),
58 # ]),
59 ('help', [
60 ('_IDLE Help...', '<<help>>'),
61 ('Python _Documentation...', '<<python-docs>>'),
62 ('_Advice...', '<<good-advice>>'),
63 ('View IDLE _Readme...', '<<view-readme>>'),
64 None,
65 ('_About IDLE...', '<<about-idle>>'),
66 ]),
69 #if sys.platform == 'win32':
70 # default_keydefs = windows_keydefs
71 #else:
72 # default_keydefs = unix_keydefs
74 default_keydefs = idleConf.GetKeys(keySetName=None)
76 del sys