[issue26488] hashlib command line interface

Aviv Palivoda report at bugs.python.org
Wed Mar 30 09:03:16 EDT 2016


Aviv Palivoda added the comment:

Sorry on the late response for some reason i don't receive email notification from the tracker for the past few days.

1) Thanks for the review SilentGhost the patch attached include your CR suggestions.

2) Raymond I have fixed the problem with ctrl+D. I tried writing a test to simulate this problem but i don't seem to be able to simulated the terminal behavior on ctrl+D.

3) Removed the block_size option as suggested by Raymond and Victor and using os.stat().st_blksize as suggested by Victor.

4) I changed the CLI to support all available algorithms in hashlib. I am not sure if this is too many choices to show in the --help message.

5) About removing the use of argparse.FileType i would prefer resolving issue 14156 but if you think this is problematic i will do the change.

6) What do you think about changing the API to be more like md5sum?
    a) Allowing * in the file name to calcualte on multiple files.
    b) Adding the check option.
    c) printing file name in output.

----------
Added file: http://bugs.python.org/file42329/hashlib-script-mod-2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26488>
_______________________________________


More information about the Python-bugs-list mailing list