Hi everyone, I am having a bit of trouble understanding what is going on below. What does the "e" in "except OSError, e:" do? Any other help you can provide regarding errno would be extremely appreciated. I've done help() and dir() on it, but I am not really understanding what's going on with "e.errno != errno.EEXIST:"
Thanks. import os, errno try: os.makedirs('a/b/c') except OSError, e: if e.errno != errno.EEXIST: raise I am in the process of writing a script to move files from one directory to another. I am supplying both the source and destination directories at runtime. I want to create the destination file on the fly; however, if it already exists, I want to handle that error/ignore that error. Also, if the the same file exists in both the source and destination directory, I'd like to override the one in the destination directory with the one in the source directory. I am having trouble with the error handling portion. Here is a pastebin for my source code: http://pastebin.com/EU578xQs
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor