read only the last x bytes from a text file
Raymond Hettinger
python at rcn.com
Wed May 29 09:32:34 EDT 2002
More information about the Python-list mailing list
Wed May 29 09:32:34 EDT 2002
- Previous message (by thread): read only the last x bytes from a text file
- Next message (by thread): Win32uiHostGlue
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Felix Seeger" <seeger at sitewaerts.de> wrote > Hi Hello! > > I am writing a log monitor. > It checks the filesize and the new filesize. > > Now I want only the difference between this vars. > eg read the last 1000 bytes from the file. > > How can I do this ? f = open('myfile') f.seek(-1000, 2) s = f.read(1000) Raymond Hettinger
- Previous message (by thread): read only the last x bytes from a text file
- Next message (by thread): Win32uiHostGlue
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list