Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:sourceforge': 0.02; 'url:py': 0.07; 'from:addr:timgolden.me.uk': 0.09; 'from:name:tim golden': 0.09; 'message-id:@timgolden.me.uk': 0.09; 'pywin32': 0.09; 'subject:error': 0.11; 'wrote:': 0.14; 'clause.': 0.16; 'errno': 0.16; 'module:': 0.16; 'msdn': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'url:hg': 0.16; 'url:pywin32': 0.16; 'windowserror': 0.16; 'holds': 0.16; 'cc:addr:python-list': 0.17; 'header:In-Reply- To:1': 0.21; 'cc:2**0': 0.22; 'cc:no real name:2**0': 0.23; 'clause': 0.23; 'code': 0.24; 'subject:List': 0.26; 'are.': 0.29; 'combination': 0.29; "python's": 0.29; 'code,': 0.29; 'cc:addr:python.org': 0.30; 'tjg': 0.30; 'url:library': 0.31; 'andrew': 0.32; 'list': 0.33; 'error': 0.33; 'decide': 0.34; 'header:User-Agent:1': 0.35; 'probably': 0.36; 'url:docs': 0.37; 'put': 0.37; 'url:python': 0.38; 'could': 0.38; 'url:org': 0.38; 'but': 0.38; 'somewhat': 0.38; 'subject:: ': 0.38; 'received:192': 0.38; 'skip:s 20': 0.39; 'should': 0.39; 'difficult': 0.39; 'help': 0.40; 'received:192.168.1': 0.40; 'url:net': 0.63; 'from:addr:mail': 0.65; 'with,': 0.77; 'ultimately,': 0.84; 'url:lib': 0.84; 'means?': 0.91; 'to:none': 0.93 Date: Fri, 20 May 2011 21:18:14 +0100 From: Tim Golden User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 CC: python-list@python.org Subject: Re: List of WindowsError error codes and meanings References: <4DD6AB5D.1040707@gmail.com> In-Reply-To: <4DD6AB5D.1040707@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 23 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1305922710 news.xs4all.nl 49041 [::ffff:82.94.164.166]:60730 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:5879 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