On Sun, Mar 3, 2013 at 8:23 AM, Terry Reedy <tjre...@udel.edu> wrote: >>>> open('sdjhfjshdfkjsh') > Traceback (most recent call last): > File "<pyshell#2>", line 1, in <module> > open('sdjhfjshdfkjsh') > FileNotFoundError: [Errno 2] No such file or directory: 'sdjhfjshdfkjsh' > > Now, does shutil pass on FileNotFoundError? I will let you experiment. > > There are error conditions that are hard to generate, but a bad file name is > not one of them.
That's actually a perfectly valid file name, but one that doesn't happen to have a corresponding file. However, the same technique will work with the OP's description of "a filename which the FAT32 didn't like" too. ChrisA -- http://mail.python.org/mailman/listinfo/python-list