Function file::readbyte()

← Back to Class file



Module fileioClass file → readbyte()

Description

Read a single byte from the opened file (binary mode)

file::readbyte(position)


Parameters


Return Value


Usage Example

import fileio
 
f = file("data.bin", file_binary + file_read)
 
b1 = f.readbyte(0x01)   ' Read 1 byte from the position 1
b2 = f.readbyte(0x02)   ' Read 1 byte from the position 2
 
f.close()