removing directories
Martin Skøtt
mskott at image.dk
Wed Dec 27 19:56:33 EST 2000
More information about the Python-list mailing list
Wed Dec 27 19:56:33 EST 2000
- Previous message (by thread): Python as a first language (Was: A Suggestion for Python Colon Syntax)
- Next message (by thread): removing directories
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
<abouf066 at aix2.uottawa.ca> writes: > Greetings, > > Is there a way to force removal of directories even if they > contain files and/or directories. I just tried > > os.rmdir( path ) and removedirs ( path) > > both functions complain about existence of files !? I just tested shutil.rmtree on my Linux box with Python 1.5.1 and it deletes a directory with files and subdirectories without complaining. I didn't put in any other options than the path. It is my experience that shutil is a lot easier to use than os, but also more lethal (easier to make mistakes and do to much). -- Med venlig hilsen Martin Skøtt mskott at image.dk Believe nothing no matter where you read it or who has said it, not even if I have said it, unless it agrees with your own reason and your own common sense. --Buddha
- Previous message (by thread): Python as a first language (Was: A Suggestion for Python Colon Syntax)
- Next message (by thread): removing directories
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list