On 2005-01-26, rbt <[EMAIL PROTECTED]> wrote: > Is there an easy way to exclude binary files (I'm working on > Windows XP) from the file list returned by os.walk()?
Sure, assuming you can provide a rigorous definition of 'binary files'. :) > 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... That depends on what you want. Adding a 'b' will disable the cr/lf handling. Not sure what else it does. > and if so, what's the reasoning behind this? Behind what? > Again all of this pertains to files on Windows XP and Python 2.4 -- Grant Edwards grante Yow! Now that I have my at "APPLE", I comprehend COST visi.com ACCOUNTING!! -- http://mail.python.org/mailman/listinfo/python-list