List of WindowsError error codes and meanings

Tim Golden mail at timgolden.me.uk
Fri May 20 16:18:14 EDT 2011


On 20/05/2011 18:56, Andrew Berg wrote:
> This is probably somewhat off-topic, but where would I find a list of
> what each error code in WindowsError means? WindowsError is so broad
> that it could be difficult to decide what to do in an except clause.
> Fortunately, sys.exc_info()[1][0] holds the specific error code, so I
> could put in an if...elif...else clause inside the except clause if I
> needed to, but I don't know what all the different errors are.

Ultimately, only MSDN can tell you :)

But to be going on with, a combination of Python's built-in errno
module:

   http://docs.python.org/library/errno.html

and the pywin32 package's winerror module:

 
http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/file/236b256c13bf/win32/Lib/winerror.py

should help

TJG



More information about the Python-list mailing list