[PYTHONMAC-SIG] need socket error codes

Joseph J. Strout jstrout@ucsd.edu
Mon, 10 Nov 1997 09:17:09 -0800


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?

Many thanks,
-- Joe


,------------------------------------------------------------------.
|    Joseph J. Strout           Department of Neuroscience, UCSD   |
|    jstrout@ucsd.edu           http://www-acs.ucsd.edu/~jstrout/  |
`------------------------------------------------------------------'
        [ Help stop spam: http://www.imc.org/ube-sol.html ]



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

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