Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Here's two more patches. One is like the old one with Amaury's comments observed. The other simply notes if there were decoding problems and warns once at the end of the listdir call.
Making a warning happen more than once is tricky because it requires messing with the warnings filter. This of course takes away some of the user's control which is one of the main reasons for using the Python warning system in the first place. (I almost wish we could write another listdir that returned the names it could decode and a list of those it couldn't.) Added file: http://bugs.python.org/file11549/listdir_encoding_warning.patch _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3187> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com