Get MD5 checksum hash of big files in Python

def checkHash(filename, blocksize=2**20):

    try:

        print(“need to creating hash of file ” +filename)

        m = hashlib.md5()

        with open(filename , “rb” ) as f:

            while True:

                buf = f.read(blocksize)

                if not buf:

                    break

                m.update( buf )

        hash1=m.hexdigest()

        print(“hash of above file is  ” + hash1)

        return hash1

    except :

        print(“Exception in hash code:”)

        print(“-” * 60)

        traceback.print_exc(file=sys.stdout)

        print(“-” * 60)

        return “error”

mysql python 3 mac

  548  pip install –egg http://dev.mysql.com/get/Downloads/Connector-Python/mysql-co‌​nnector-python-2.1.4‌​.zip

  549  pwd

  550  python manage.py 

  551  pip list

  552  pip install mysql-connector-python-rf

  553  python manage.py 

  554  pip install MySQL-python

  555  pip install mysql-python

  556  brew install mysql-connector-c 

  557  pip install mysql-python

  558  pip install MySQL-python

  559  pip install MySQL-python

  560  export PATH=$PATH:/usr/local/mysql/bin/

  561  pip install MySQL-python

  562  pip install MySQL-python

  563  pip install pymysql

  564  python manage.py 

  565  python manage.py 

  566  pip install MySQL-python

  567  pip3 install mysql-connect-python

  568  pip3 install http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.0.4.zip

  569  pip install mysqlclient