On Tue, Oct 04, 2005 at 05:19:37PM -0400, Mohammed Smadi wrote: > what else would you do? I am using examples from the web and they all > bind to a port at the localhost before connecting to the remote host. [...]
the web must be stupider than I thought.
Here's how Python's own ftplib connects to an ftp server (dedented for clarity):
try:
self.sock = socket.socket(af, socktype, proto)
self.sock.connect(sa)
except socket.error, msg:
...
there's no need to call bind() before connect.
Jeff
pgpHhphJklBxU.pgp
Description: PGP signature
-- http://mail.python.org/mailman/listinfo/python-list
