|
5 | 5 | 1. End of file on input is processed as the command 'EOF'.
|
6 | 6 | 2. A command is parsed out of each line by collecting the prefix composed
|
7 | 7 | of characters in the identchars member.
|
8 |
| -3. A command `foo' is dispatched to a method 'do_foo()'; the do_ method |
| 8 | +3. A command 'foo' is dispatched to a method 'do_foo()'; the do_ method |
9 | 9 | is passed a single argument consisting of the remainder of the line.
|
10 | 10 | 4. Typing an empty line repeats the last command. (Actually, it calls the
|
11 |
| - method `emptyline', which may be overridden in a subclass.) |
12 |
| -5. There is a predefined `help' method. Given an argument `topic', it |
13 |
| - calls the command `help_topic'. With no arguments, it lists all topics |
| 11 | + method 'emptyline', which may be overridden in a subclass.) |
| 12 | +5. There is a predefined 'help' method. Given an argument 'topic', it |
| 13 | + calls the command 'help_topic'. With no arguments, it lists all topics |
14 | 14 | with defined help_ functions, broken into up to three topics; documented
|
15 | 15 | commands, miscellaneous help topics, and undocumented commands.
|
16 |
| -6. The command '?' is a synonym for `help'. The command '!' is a synonym |
17 |
| - for `shell', if a do_shell method exists. |
| 16 | +6. The command '?' is a synonym for 'help'. The command '!' is a synonym |
| 17 | + for 'shell', if a do_shell method exists. |
18 | 18 | 7. If completion is enabled, completing commands will be done automatically,
|
19 | 19 | and completing of commands args is done by calling complete_foo() with
|
20 | 20 | arguments text, line, begidx, endidx. text is string we are matching
|
|
23 | 23 | indexes of the text being matched, which could be used to provide
|
24 | 24 | different completion depending upon which position the argument is in.
|
25 | 25 |
|
26 |
| -The `default' method may be overridden to intercept commands for which there |
| 26 | +The 'default' method may be overridden to intercept commands for which there |
27 | 27 | is no do_ method.
|
28 | 28 |
|
29 |
| -The `completedefault' method may be overridden to intercept completions for |
| 29 | +The 'completedefault' method may be overridden to intercept completions for |
30 | 30 | commands that have no complete_ method.
|
31 | 31 |
|
32 |
| -The data member `self.ruler' sets the character used to draw separator lines |
| 32 | +The data member 'self.ruler' sets the character used to draw separator lines |
33 | 33 | in the help messages. If empty, no ruler line is drawn. It defaults to "=".
|
34 | 34 |
|
35 |
| -If the value of `self.intro' is nonempty when the cmdloop method is called, |
| 35 | +If the value of 'self.intro' is nonempty when the cmdloop method is called, |
36 | 36 | it is printed out on interpreter startup. This value may be overridden
|
37 | 37 | via an optional argument to the cmdloop() method.
|
38 | 38 |
|
39 |
| -The data members `self.doc_header', `self.misc_header', and |
40 |
| -`self.undoc_header' set the headers used for the help function's |
| 39 | +The data members 'self.doc_header', 'self.misc_header', and |
| 40 | +'self.undoc_header' set the headers used for the help function's |
41 | 41 | listings of documented functions, miscellaneous topics, and undocumented
|
42 | 42 | functions respectively.
|
43 | 43 | """
|
|
0 commit comments