Name

loadBytes()

Examples
# Open a file and read its binary data
b = loadBytes("something.dat")

# Print each value, from 0 to 255
for i in range(len(b)):
    # Every tenth number, start a line
    if (i % 10) == 0:
        print("")

    # bytes are from -128 to 127, this converts to 0 to 255
    a = b[i] & 0xff
    print("%i " % (a))
# Print a blank line at the end
print("")
Description
Syntax
loadBytes(filename)
Parameters
filename
Related loadStrings()
saveStrings()
saveBytes()
Updated on Wed Jan 18 17:32:21 2017.
Creative Commons License