トップ 一覧 検索 ヘルプ RSS ログイン

md5.pyの変更点

  • 追加された行はこのように表示されます。
  • 削除された行はこのように表示されます。
{{category Python Standard Library}}
{{category Python}}

 import hashlib
 
 for arg in sys.argv[1:]:
     mdf = hashlib.md5()
 
     # read() reads full contents when no arguments.
     # "b" is for Windows.
     f = open(path, "rb")
     mdf.update(f.read())
     f.close()
     print(mdf.hexdigest().upper())