Yannick Gingras schrieb:
"Alexandre Vassalotti" <[EMAIL PROTECTED]> writes:
So now I am not sure what OP is proposing. Do you want to replace 21
with EISDIR in the above?
Yes, that's what I had in mind.
Then, check out EnvironmentError_str in Objects/exceptions.c. You
should be able impor
"Guido van Rossum" <[EMAIL PROTECTED]> writes:
> Have you considered whether this works on all platforms? (E.g.
> Windows, or embedded non-Unix-based.)
Yes but I guess I didn't comment it properly. The line
printed_errno = errno_str ? errno_str : self->myerrno;
ensures that we gracefully fal
"Alexandre Vassalotti" <[EMAIL PROTECTED]> writes:
>>> So now I am not sure what OP is proposing. Do you want to replace 21
>>> with EISDIR in the above?
>>
>> Yes, that's what I had in mind.
>>
>
> Then, check out EnvironmentError_str in Objects/exceptions.c. You
> should be able import the errn
> Until recently, python had its own cross-platform implementation of
> strerror, but it was removed because it was deemed redundant. This
> tells me that it should work on windows.
That conclusion is incorrect. It works on MSVCRT, but for this specific
aspect, using MSVCRT is a bad idea (because
On Fri, May 16, 2008 at 10:52 AM, Yannick Gingras <[EMAIL PROTECTED]> wrote:
> "Alexander Belopolsky" <[EMAIL PROTECTED]> writes:
>
> try:
>> ...open('/')
>> ... except Exception,e:
>> ...pass
>> ...
> print e
>> [Errno 21] Is a directory
>>
>> So now I am not sure what OP is propos
On 2008-05-16 17:02, Alexander Belopolsky wrote:
On Fri, May 16, 2008 at 10:52 AM, Yannick Gingras <[EMAIL PROTECTED]> wrote:
print e
[Errno 21] Is a directory
So now I am not sure what OP is proposing. Do you want to replace 21
with EISDIR in the above?
Yes, that's what I had in mind.
I
On 2008-05-16 16:15, Nick Coghlan wrote:
Alexander Belopolsky wrote:
Yannick Gingras ygingras.net> writes:
2) Where can I find the symbolic name in C?
Use standard C library char* strerror(int errnum) function. You can see
an example usage in Modules/posixmodule.c (posix_strerror).
I don
On Fri, May 16, 2008 at 10:52 AM, Yannick Gingras <[EMAIL PROTECTED]> wrote:
> print e
>> [Errno 21] Is a directory
>>
>> So now I am not sure what OP is proposing. Do you want to replace 21
>> with EISDIR in the above?
>
> Yes, that's what I had in mind.
>
In this case, I have a more drasti
"Alexander Belopolsky" <[EMAIL PROTECTED]> writes:
try:
> ...open('/')
> ... except Exception,e:
> ...pass
> ...
print e
> [Errno 21] Is a directory
>
> So now I am not sure what OP is proposing. Do you want to replace 21
> with EISDIR in the above?
Yes, that's what I had in mi
On Fri, May 16, 2008 at 10:15 AM, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> Alexander Belopolsky wrote:
..
>> Use standard C library char* strerror(int errnum) function. You can see
>> an example usage in Modules/posixmodule.c (posix_strerror).
>
> I don't believe that would provide adequate Wind
On Sat, 17 May 2008 00:15:23 +1000, Nick Coghlan <[EMAIL PROTECTED]> wrote:
Alexander Belopolsky wrote:
Yannick Gingras ygingras.net> writes:
2) Where can I find the symbolic name in C?
Use standard C library char* strerror(int errnum) function. You can see
an example usage in Modules/posi
Alexander Belopolsky wrote:
Yannick Gingras ygingras.net> writes:
2) Where can I find the symbolic name in C?
Use standard C library char* strerror(int errnum) function. You can see
an example usage in Modules/posixmodule.c (posix_strerror).
I don't believe that would provide adequate Win
Yannick Gingras wrote:
1) Should OSError.__str__() print the symbolic name of errno?
+1 (assuming the performance hit for doing so is incurred only when the
exception is actually printed)
2) Where can I find the symbolic name in C?
Modules/errnomodule.c
Cheers,
Nick.
--
Nick Coghlan |
Yannick Gingras ygingras.net> writes:
..
>
> 1) Should OSError.__str__() print the symbolic name of errno?
>
+1 for the change
> 2) Where can I find the symbolic name in C?
Use standard C library char* strerror(int errnum) function. You can see
an example usage in Modules/posixmodule.c (pos
Hi,
I spent some time googleing for "OSError 4" before it occurred to me
that "4" was actually an irrelevant implementation detail. As soon as
I searched for "EINTR", I found exactly what I was looking for. (not
really but this is another story)
I jumped to the conclusion that OSError.__str_
15 matches
Mail list logo