Define new builtins 'quit' and 'exit'. These are objects which make the interpreter exit when called. The repr of each object contains a hint at how it works.
()
| 396 | return known_paths |
| 397 | |
| 398 | def setquit(): |
| 399 | """Define new builtins 'quit' and 'exit'. |
| 400 | |
| 401 | These are objects which make the interpreter exit when called. |
| 402 | The repr of each object contains a hint at how it works. |
| 403 | |
| 404 | """ |
| 405 | if os.sep == '\\': |
| 406 | eof = 'Ctrl-Z plus Return' |
| 407 | else: |
| 408 | eof = 'Ctrl-D (i.e. EOF)' |
| 409 | |
| 410 | builtins.quit = _sitebuiltins.Quitter('quit', eof) |
| 411 | builtins.exit = _sitebuiltins.Quitter('exit', eof) |
| 412 | |
| 413 | |
| 414 | def setcopyright(): |