On Sat, 17 May 2008 00:15:23 +1000, Nick Coghlan <[EMAIL PROTECTED]> wrote:
Alexander Belopolsky wrote:
Yannick Gingras <ygingras <at> 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 Windows support.


It's not C, but maybe it's interesting to look at anyway:

http://twistedmatrix.com/trac/browser/trunk/twisted/python/win32.py?rev=21682#L94

However, neither strerror nor the linked code gives out symbolic names for
errnos.  They both produce messages like "Interrupted system call", whereas
the symbolic name would be "EINTR".  Modules/errnomodule.c might be worth
looking at, although its solution is somewhat disappointing.

Jean-Paul
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to