I have this str
(coming from a file I can't fix):
In [131]: s
Out[131]: '\\xce\\xb8Oph'
This is close to the repr of a string encoded in utf8:
In [132]: repr('θOph'.encode('utf8'))
Out[132]: "b'\\xce\\xb8Oph'"
I need the original encoded string. I can do it with
In [133]: eval("b'{}'".format(s)).decode('utf8')
Out[133]: 'θOph'
But I would be ... sad? if there were no simpler option to get it. Is there a better way?