help with bind() in python 2

Emile van Sebille emile at fenx.com
Sat Nov 18 20:14:21 EST 2000


Several networking related functions now require a tuple
instead of two arguments.  Try putting an extra set of
paren's in there.

s.bind(('',port))


--

Emile van Sebille
emile at fenx.com
-------------------


"Scott Hathaway" <slhath at home.com> wrote in message
news:kKER5.21023$yR4.303929 at news1.rdc1.tx.home.com...
> Hello Everyone,
>
> I have a script that works fine in py 1.5.2 but is not
working in py 2.0.
> Here are the lines that are given in the traceback:
>
>     s = socket(AF_INET, SOCK_STREAM)
>     s.bind('', port)
>     s.listen(1)
>
> It tells me that bind only takes one argument.  Can anyone
tell me what to
> do?
>
> Thanks,
> Scott
>
>





More information about the Python-list mailing list