On 2011.05.26 10:02 AM, Thomas Heller wrote:
> On Windows, you can use ctypes.FormatError(code) to map error codes
> to strings:
>
> >>> import ctypes
> >>> ctypes.FormatError(32)
> 'Der Prozess kann nicht auf die Datei zugreifen, da sie von einem
> anderen Prozess verwendet wird.'
> >>>
>
> Fo
Am 20.05.2011 19:56, schrieb Andrew Berg:
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 spe
Genstein invalid.invalid> writes:
>
> > Andrew Berg gmail.com> writes:
> > Since Python 2.5, the errno attribute maps the Windows error to error
> > codes that match the attributes of module errno.
>
> Good point, I completely misread that. At least the Windows error code
> is still available
On 2011.05.21 06:46 AM, John J Lee wrote:
> Since Python 2.5, the errno attribute maps the Windows error to error
> codes that match the attributes of module errno.
I was able to whip up a nifty little function that takes the output of
sys.exc_info() after a WindowsError and return the error code.
Andrew Berg writes:
Since Python 2.5, the errno attribute maps the Windows error to error
codes that match the attributes of module errno.
Good point, I completely misread that. At least the Windows error code
is still available as the winerror attribute.
As an aside - call me stupid, but I
Andrew Berg writes:
> 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 co
On 2011.05.20 02:47 PM, Genstein wrote:
> 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?
>
> Assuming it's a Win32 error code, winerror.h from the Platform SDK holds
> the answer. One
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 speci
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?
Assuming it's a Win32 error code, winerror.h from the Platform SDK holds
the answer. One version is linked below, it's in theory out of date
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...
10 matches
Mail list logo