Need help reading damaged file

Delaney, Timothy tdelaney at avaya.com
Mon Oct 14 20:08:55 EDT 2002


> From: PoulsenL at capanalysis.com [mailto:PoulsenL at capanalysis.com]
> 
> I have about 100+ files that are a dump of old tape from a 
> database.  Most
> of the data is good, but it is interspersed with damage that contains
> backspace characters and I _believe_ EOF characters.  When we 
> try to import
> the data it only imports 1/3 or 1/10, etc of the data 
> depending on the file.

You will need to open the files in binary mode. In text mode, embedded EOF
characters will stop processing. In binary mode, it will rely on the size
reported by the filesystem.

Tim Delaney




More information about the Python-list mailing list