misc: Text vs Byte string in python3
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Mon, 2 Mar 2020 15:16:09 +0000 (15:16 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 13 Mar 2020 14:24:07 +0000 (14:24 +0000)
commite06ec8c423328ba943d6b21e0f06f9b8afba9195
tree908a9279fbe41e26d5ce59bceabfb9b4f9dd5b02
parentbb95aa14c6fe2e01181c20a3821ce1631479f5fa
misc: Text vs Byte string in python3

Python 3 uses the concepts of two different types:
text and binary strings.
Those cannot be implicilty combined (as it was happening in python2) and
in order to be used together one of them must be converted to the other
type:

* Text can be encoded into Bytes via the encode() method
* Bytes can be decoded to Text using the decode() method

By default encode/decode will assume UTF-8 format

JIRA: https://gem5.atlassian.net/browse/GEM5-345

Change-Id: I1bdf7db17b49cc109239fd5f44791769370853f8
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26250
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
SConstruct
src/SConscript
src/python/m5/util/__init__.py