"Linus Nordström" <[EMAIL PROTECTED]> wrote

> im having problem whit recv. It will not break the loop if ther are
> nothing more to recive.

Take a look at the client side of the address book
example in my network profgramming topic. It shows
an example of breaking out of a recv loop.

Another option is to use the select module services

> And on another note, is there a way to use the self. less,
> it might be just me but it looks rather ugly :)

No, it's good practice, it distinguishes between class level
variables and local variables. The use of self/this etc is usually
required in industrial coding standards for C++ and Java
(eg Dept of defense/Government etc) for the same reason,
even though those languages don't require it. As in many
things python is simply enforcing what is already considered
good practice elsewhere.

HTH,

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to