Random Access Files

Steve Purcell stephen_purcell at yahoo.com
Thu Mar 15 09:54:30 EST 2001


Colin Meeks wrote:
> Is it possible to have random access files as opposed to serial access.

Yes. 

The built-in function 'open' is described at

  http://www.python.org/doc/lib/built-in-funcs.html

and returns a file object as desribed by

  http://www.python.org/doc/lib/bltin-file-objects.html

If you open a file for 'updating' (e.g. using mode 'r+'), it's a random access
file.

-Steve

-- 
Steve Purcell, Pythangelist
Get testing at http://pyunit.sourceforge.net/
Any opinions expressed herein are my own and not necessarily those of Yahoo




More information about the Python-list mailing list