[Pythonmac-SIG] socket code works on Win32 but not Mac :-(

Bill Janssen janssen at parc.com
Thu Jan 15 18:39:19 CET 2009


Ranec <python-mac at cemery.org.uk> wrote:

>         s.connect(('google.com', 0))

What does this even mean?  "google.com" is a domain, not a server
(though it does forward to "www.google.com").  And port 0?  Does
anything listen on port 0?  Sounds like OS X is the only platform that
gets this right :-).  Try this:

  s.connect(('www.google.com', 80))

for instance, to connect to the Web server.

Bill


More information about the Pythonmac-SIG mailing list