Message148600
Sure -- the repro steps are pretty easy:
1. Startup an interactive python shell.
2. Enter in the following code:
{{{
import cmd
class Foo(cmd.Cmd):
def do_bar(self, arg):
"""bar"""
Foo().cmdloop()
}}}
3. You will be greeted with the standard `(Cmd)' prompt.
4. Press enter. Nothing will be printed out (it will continue on to the next line).
5. Enter in Control-D, you will be greeted with `Unknown syntax: EOF' error message from cmd.Cmd.default(..).
6. Press enter multiple times.
Expected output:
- Since a do_EOF handler isn't installed in 5., I expect to see the `Unknown syntax: EOF' error print out on the console. I don't want to delve into whether or not this should or shouldn't be printed out in this ticket.
- Every time I press <enter> I should be greeted with the prompt, and not the `Unknown syntax: EOF` error.
Actual output:
- I see `Unknown syntax: EOF' error, and every time I press <enter> it displays the error beforementioned error.
Example:
{{{
>>> import cmd
>>> class Foo(cmd.Cmd):
... def do_bar(self, arg):
... """bar"""
...
>>> Foo().cmdloop()
(Cmd)
(Cmd)
bar help
(Cmd) help bar
bar
(Cmd) ^D*** Unknown syntax: EOF
(Cmd)
*** Unknown syntax: EOF
(Cmd)
*** Unknown syntax: EOF
}}} |
|
Date |
User |
Action |
Args |
2011-11-29 20:04:45 | ngie | set | recipients:
+ ngie, jcea |
2011-11-29 20:04:45 | ngie | set | messageid: <1322597085.53.0.375939873101.issue13500@psf.upfronthosting.co.za> |
2011-11-29 20:04:42 | ngie | link | issue13500 messages |
2011-11-29 20:04:42 | ngie | create | |
|