When trying to open a directory, an exception is thrown:
>>> try: ... open( '/' ) ... except IOError, e: ... print e.filename None
Is it possible (preferrably in python 2.3.4) for the handler of the exception to get the name of the directory from the exception object?