Garrett Cooper <yaneg...@gmail.com> added the comment:

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.

----------
nosy: +yaneurabeya

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1294>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to