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.'
For HRESULT codes,
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
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. I
Genstein genstein at invalid.invalid writes:
Andrew Bergbahamutzero8825 at 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
Andrew Berg bahamutzero8...@gmail.com 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
Andrew Bergbahamutzero8...@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 as the winerror attribute.
As an
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
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
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
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
10 matches
Mail list logo