Mac out of memory error on socket.bind

P.M. pythonmonkey at hotmail.com
Mon Mar 4 23:39:26 EST 2002


hi all,

I'm trying some simple python socket programming on my powerbook
(OS9.2) and I'm getting an 'out of memory' error when I try to bind a
socket, i.e.:

HOST = ''                 # Symbolic name meaning the local host
PORT = 50007              # Arbitrary non-privileged port
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((HOST, PORT)) # errors here

It only fails when my network connection is unplugged (I'm doing my
playing around while I commute) and works fine when I have a valid
connection.

Is there a setting under TCP/IP that'll let me do this sort of
localhost-only socket programming while I'm offline?

thanks,
jim



More information about the Python-list mailing list