from __future__ import print_function

__author__ = 'Samuel Gratzl'

if __name__ == '__main__':
  import uuid
  import hashlib

  password = input('enter password: ').encode('utf-8')
  salt = uuid.uuid4().hex.encode('utf-8')
  hashed_password = hashlib.sha512(password + salt).hexdigest()
  print(password)
  print(salt)
  print(hashed_password)

Add encryptor_python3.py compatible with Python 3