here s it, hoping it might help some newbie like me:)
if value[:4]== '4501':
What you can do with an object depends entirely on its class. I suspect that your object's class is pyasn1.type.univ.OctetString. You should probably be able to convert the value to a python string by using mystring = str(value) .