deltree function

Mark markmcmahon at
Tue Sep 19 18:27:03 CEST 2000

In article <oq3djps4p1.fsf at>,
  =?ISO-8859-1?Q?Fran=E7ois_Pinard?= <pinard at> wrote:
> --=-=-=
> [Arkaitz]
> > Is there a deltree-like function in the Python standard library?  I
> > been looking at os.removedirs(), but it won't delete non-empty
> > directories.  I'd like to delete a whole tree, with files and
> > mixed, as rm -rf does in Unix.  Any hint?
> Hello, Arkaitz.  As others suggested, the simplest is to execute the
> command `rm -rf' from within your Python program.
 - just one other note : NT does not have Deltree (mine doesnt anyway)
so even on windows either deltree(win9x) or rd /s(NTx) will be non
portable .


Sent via
Before you buy.

More information about the Python-list mailing list