def copy_byte(src, dest):
 byte = src.read(1)
 dest.write(byte)
 (val,) = unpack('B', byte)
 return val

def copy_byte ( src , dest ) : byte = src . read ( 1 ) dest . write ( byte ) ( val , ) = unpack ( 'B' , byte ) return val
copy an unsigned byte between files .