Message145854
I realize that this bug is closed, but I just had a comment to make.
Handling EOF is simple:
def do_EOF(self, arg):
pass
For my purposes I want to raise an EOFError so I can trickle up the chain to the appropriate caller because I'm coding a CLI where I have a nested set of commands, e.g.
command subcommand_0
command subcommand_1
I'd like the behavior to match what's done in Cisco IOS or IronPort's CLI (to some degree).
The only part that's annoying is that I have to hide do_EOF in the help and completion output, otherwise the user will see the handler when completing or running help, but I'll bring that up in another issue. |
|
Date |
User |
Action |
Args |
2011-10-18 19:03:44 | ngie | set | recipients:
+ ngie, gvanrossum, isandler, draghuram, alexandre.vassalotti, stephbul |
2011-10-18 19:03:44 | ngie | set | messageid: <1318964624.38.0.193403859184.issue1294@psf.upfronthosting.co.za> |
2011-10-18 19:03:43 | ngie | link | issue1294 messages |
2011-10-18 19:03:43 | ngie | create | |
|