[PYTHONMAC-SIG] need socket error codes

Bill Bedford billpy@mousa.demon.co.uk
Tue, 11 Nov 1997 01:08:26 +0000


At 5:17 pm +0000 10/11/97, Joseph J. Strout
wrote:
~I'm trying to get Sam Rushing's "asyncore" module to work under MacOS.  It
~looks like it just needs some constants, since on the following code...
~
~---
~import os
~if os.name == 'nt':
~	EWOULDBLOCK	= 10035
~	EINPROGRESS	= 10036
~	EALREADY	= 10037
~	ECONNRESET  = 10054
~	ENOTCONN	= 10057
~else:
~	from errno import EALREADY, EINPROGRESS, EWOULDBLOCK,
~ECONNRESET,ENOTCONN
~---
~
~we get an "ImportError: No module named errno".  Apparently WinNT doesn't
~have an "errno" module either, so Sam has hardcoded some constants; we need
~only to do the same for MacOS.  But I've poked around in the socket module
~and can't seem to find any such constants.  Can anyone help me out here?
~

All these except EWOULDBLOCK are in macerrors.py. You can check them in
errors.txt in Mac-->scripts to see what is available and their values.


_______________
PYTHONMAC-SIG  - SIG on Python for the Apple Macintosh

send messages to: pythonmac-sig@python.org
administrivia to: pythonmac-sig-request@python.org
_______________