@@ -107,6 +107,18 @@ def addpackage(sitedir, name):
|
107 | 107 | if os.path.isdir(sitedir): |
108 | 108 | addsitedir(sitedir) |
109 | 109 | |
| 110 | +# Define new built-ins 'quit' and 'exit'. |
| 111 | +# These are simply strings that display a hint on how to exit. |
| 112 | +if os.sep == ':': |
| 113 | +exit = 'Use Cmd-Q to quit.' |
| 114 | +elif os.sep == '\\': |
| 115 | +exit = 'Use Ctrl-Z plus Return to exit.' |
| 116 | +else: |
| 117 | +exit = 'Use Ctrl-D (i.e. EOF) to exit.' |
| 118 | +import __builtin__ |
| 119 | +__builtin__.quit = __builtin__.exit = exit |
| 120 | +del exit |
| 121 | + |
110 | 122 | try: |
111 | 123 | import sitecustomize # Run arbitrary site specific code |
112 | 124 | except ImportError: |
|