New submission from Dan Koch :
The following sequence raises an exception, but nonetheless removes all files
from the Desktop under Windows Vista.
import os, shutil, user
desktop_dir = os.path.join(user.home, 'Desktop')
os.chdir(desktop_dir)
shutil.rmtree('')
This
Dan Koch added the comment:
Here's the session printout. Desktop files under Vista still get deleted
despite the exception. Does not occur on Fedora 12 or Mac OS X. I can code
around it by testing for a blank filepath, but it was a surprise.
C:\Users\ko5>python
Python 2.6.4 (r264:75