Author ngie
Recipients ngie, rhettinger
Date 2011-10-21.05:43:15
SpamBayes Score 5.23228e-09
Marked as misclassified No
Message-id <1319175797.72.0.144772812854.issue13214@psf.upfronthosting.co.za>
In-reply-to
Content
Here's a version incorporating your suggestion and better documenting the choices and the method for overriding purposes. I have a few reservations with the current implementation:

1. As noted, the information for the class really could be and should be cached as the attributes of a given cmd.Cmd derived class don't change all that frequently.
2. One has to override the entire function in order to get what I consider standard functionality (filtering).. so I don't know if that's a good idea.
3. I've thought about the do_EOF handler stuff, and it would be nice if that was shoved into the completer method(s) as a keyword argument, defaulting to False -- that way one could avoid having to explicitly install an EOF handler when dealing with ^D, etc, but this can be hashed out better in a different issue, over IRC, email, etc.

This module could be better cleaned up (isn't PEP8 compliant, overrides built-ins, is pythonic but not super pythonic, etc), but I'll see what other modules exist out there that could be used in its place, because they could have resolved some of these issues. There is some value that can be obtained from pexpect, some of the other cmd module variants, etc .. I just like this module because it's nice, simple, and standard -- it just needs a little love and it will be awesome.

Anyhow -- thanks again for the work :).
History
Date User Action Args
2011-10-21 05:43:17ngiesetrecipients: + ngie, rhettinger
2011-10-21 05:43:17ngiesetmessageid: <1319175797.72.0.144772812854.issue13214@psf.upfronthosting.co.za>
2011-10-21 05:43:17ngielinkissue13214 messages
2011-10-21 05:43:16ngiecreate