> By way of motivation, I wrote that email after copying/pasting the > following a few times around a project until I wrote it into def > SilentlyDelete() and its cousin SilentlyRmdir() > > """ code involving somefile """ > try: > ........os.remove(somefile) > except: > .......pass # The bloody search indexer has got the file and I > can't delete it. Nothing to be done.
You just found the right solution: define a function for something that you do repeatedly. No need to change the language. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list