Mercurial > hg
view tests/sha256line.py @ 51378:82131be5258e
dispatch: don't attempt to import debugger as bytestring
The __import__ thingie needs a string, not a bytestring. Guess I'm the
only one who uses this once in a while and noticed it was broken.
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Wed, 14 Feb 2024 15:23:59 -0500 |
parents | fa4c4fa232d6 |
children |
line wrap: on
line source
#!/usr/bin/env python3 # # A tool to help producing large and poorly compressible files # # Usage: # $TESTDIR/seq.py 1000 | $TESTDIR/sha256line.py > my-file.txt import hashlib import sys for line in sys.stdin: print(hashlib.sha256(line.encode('utf8')).hexdigest())