This will allow the creation of docannotate function signatures such as:
@docannotate
def read_binary_data():
"""Read some binary data that cannot be easily printed as a string.
Returns:
bytes format-as hexdump: The binary data that we read.
"""
That annotation will pass back binary data to the user as bytes when called from python
but if invoked directly from the python shell using e.g. the iotile tool in CoreTools, it will print a hex representation of the binary string instead. For functions that expect to generate a large amount of binary data, you can use format-as hexdump instead which will generate a nice hex dump with address offset, structured hex formatting and ascii conversion.
This will allow the creation of
docannotate
function signatures such as:That annotation will pass back binary data to the user as
bytes
when called from python but if invoked directly from the python shell using e.g. theiotile
tool in CoreTools, it will print a hex representation of the binary string instead. For functions that expect to generate a large amount of binary data, you can useformat-as hexdump
instead which will generate a nice hex dump with address offset, structured hex formatting and ascii conversion.Closes #54