Garrett Cooper <yaneg...@gmail.com> added the comment: 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 :). ---------- Added file: http://bugs.python.org/file23485/python-cmd-better-filtering.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13214> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com