Steve Juranich wrote:

>I know that there's os.strerror to get the error string, and the errno
> module gives me all of the mappings like 34 -> ERANGE.  But I have yet
> to find out how to check the value of errno in a Python script.

    import os, errno

    try:
        os.remove("nisse")
    except OSError, v:
        print v.errno
        print errno.errorcode[v.errno]
        print os.strerror(v.errno)

</F> 



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to