Possible Duplicate:
Why is ‘\x’ invalid in Python?
realId = 'Test'
id = ""
for x in realId:
id += '\x'+str(ord(x))
print id
Honestly I'm pretty new to python and askii conversion so this should be a quick answer. I'm getting an error when creating this string, would anyone like to point me in the right direction?