This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ngie
Recipients alexandre.vassalotti, draghuram, gvanrossum, isandler, ngie, stephbul
Date 2011-10-18.19:03:43
SpamBayes Score 4.9291757e-05
Marked as misclassified No
Message-id <1318964624.38.0.193403859184.issue1294@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-10-18 19:03:44ngiesetrecipients: + ngie, gvanrossum, isandler, draghuram, alexandre.vassalotti, stephbul
2011-10-18 19:03:44ngiesetmessageid: <1318964624.38.0.193403859184.issue1294@psf.upfronthosting.co.za>
2011-10-18 19:03:43ngielinkissue1294 messages
2011-10-18 19:03:43ngiecreate