I am trying to encode and decode a text in python using the codecs library. Here is my code:
>>> import codecs
>>> codecs.unicode_escape_encode('my Text')
(b'my Text', 7)
Then how can I get my orginal code back with codecs.unicode_escape_decode()? I tried:
>>> codecs.unicode_escape_decode("(b'my Text', 7)")
("(b'my Text', 7)", 15)
but it does not give 'my text'. If you need more details, please tell me.