On Wed, 26 Jan 2005 18:25:09 -0500, "Dan Perl" <[EMAIL PROTECTED]> wrote:
> >"rbt" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >> Is there an easy way to exclude binary files (I'm working on Windows XP) >> from the file list returned by os.walk()? >> >> Also, when reading files and you're unsure as to whether or not they are >> ascii or binary, I've always thought it safer to 'rb' on the read, is this >> correct... and if so, what's the reasoning behind this? Again all of this >> pertains to files on Windows XP and Python 2.4 > >Please clarify: is your question about identifying binary (non-ascii) files >or about using os.walk? > > I have a feeling it's about walking directories and identifying which files to should be "cooked" (to normalize line endings when opened and read). Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list