You are extracting the file path from sys.argv[0]
and compute its md5 (that is, the md5 of the path as a string). To compute the md5 of the file contents, use:
import sys
import hashlib
file_path = sys.argv[0]
with open(file_path, 'rb') as file_handle:
file_contents = file_handle.read()
print('MD5 - ' + hashlib.md5(file_contents).hexdigest())
EDIT
Using hashlib.md5(open(file_name, 'rb').read())
is a bad practice because it does not close the file properly.