(self, fhandle, number, field, reclen, locks)
Initialise random-access file.
Initialise random-access file.
Initialise random - access file .
def __init__(self, fhandle, number, field, reclen, locks):
        """Initialise random-access file."""
        # note that for random files, output_stream must be a seekable stream.
        RawFile.__init__(self, fhandle, b'D', b'R')
        self.reclen = reclen
        self._locks = locks
        self._number = number
        # all text-file operations on a RANDOM file (PRINT, WRITE, INPUT, ...)
        # actually work on the FIELD buffer; the file stream itself is not
        # touched until PUT or GET.
        self._field_file = FieldFile(field, reclen)
        # position at start of file
        self._recpos = 0
        self._fhandle.seek(0)
def __init__ ( self , fhandle , number , field , reclen , locks ) : # note that for random files, output_stream must be a seekable stream. RawFile . __init__ ( self , fhandle , b'D' , b'R' ) self . reclen = reclen self . _locks = locks self . _number = number # all text-file operations on a RANDOM file (PRINT, WRITE, INPUT, ...) # actually work on the FIELD buffer; the file stream itself is not # touched until PUT or GET. self . _field_file = FieldFile ( field , reclen ) # position at start of file self . _recpos = 0 self . _fhandle . seek ( 0 )