[Pythonmac-SIG] [OT] Today's gadfly triumph

Richard Gordon richard@richardgordon.net
Fri, 4 May 2001 12:09:00 -0400


It's not a Mac-centric issue and maybe some of you have already 
figured this out, but the client and server modules in gadfly broke 
somewhere around Python 2 due to a change in some socket stuff. As 
is, each gets upset because the number of arguments being passed 
should be 1 when it is 2. Anyway, I figured out that what will work 
is to modify the modules to pass a tuple with 2 elements and have 
outlined the changes below (my tuple's name refers to the wisdom that 
even a blind hog finds an acorn now and then, you can call it 
whatever you like). So this works now under Python 2.1 and my Mac is 
running the server while my win2k box accesses it with the client. 
Pretty groovey.

gfserve.py line 335:
#change from
#sock.bind(self.HOST, self.port)
#to
blindhog = self.HOST, self.port
sock.bind(blindhog)

gfclient.py line 141:
#change from
#sock.connect(self.machine, self.port)
#to
blindhog = self.machine, self.port
sock.connect(blindhog)

Richard Gordon
--------------------
Gordon Design
Web Design/Database Development
http://www.richardgordon.net