I'm trying to retrofit a bit of code a friend gave me. This is what a snippet of what I have right now:
print 'Message is', message
md5Hash = hashlib.md5(message).hexdigest()
print 'Hash is', md5Hash
tempName = md5Hash + '.glados.wav'
doneName = 'ok-' + md5Hash + '.done.wav'
for f in os.listdir(filesPath):
if f[-4:] in ('.wav', '.mdd'):
os.remove(filesPath + os.sep + f)
Right now, it is receiving the "message" variable from an argument passed when the script is run. What I would like to do is take the output from a Redis command:
LPOP myList
"one"
and put that "one" as the "message" python variable.
There's probably an easy way to do this that I'm overlooking, so any help would be greatly appreciated.