rm -rf in python?

VanL vlindberg at verio.net
Thu Nov 14 23:32:13 EST 2002


Is there a way (short of executing a shell command) that I can do a rm 
-rf on a directory from python?  It raises an OSError if you try to 
delete a directory that has contents.  I suppose that I could recurse 
down through, deleteing as I went, but it seems that there must be an 
easier way.

Anyone know it?

Thanks,

VanL





More information about the Python-list mailing list