I'm new to Python, using 2.7.12 and am trying to run a very simple script that will hash a 'salt' and simple password using a DES algorithm (I know DES is outdated but this is just to learn how to generate a hash value with a salt). I have this working in the interpreter (i.e. I get the expected hash output 'HX9LLTdc/jiDE') but when I try to run it in my sublime text and/or via command line I get no errors but no output either? I know this is a simple fix but i'm having a blank as to why its not outputting the hash value in my command line after running the script? Any advice, much appreciated.
import passlib.hash
def createHash():
salt = "HX"
word = "egg"
cryptWord = passlib.hash.des_crypt.encrypt(word, salt=salt)
print "DES:" + cryptWord
createHash?createHash, but doesn't actually call it.