There is no blowfish built in. If you can use other modules try bcrypt it does exactly what you need. So the function will be:
import hashlib
import brypt
def myhash(word):
salt = "$2a$06$" + hashlib.sha1(word).hexdigest()[0:22] + "$"
return bcrypt.hashpw(word, salt)