[Tutor] send issue

Lolo Lolo losermeloser at yahoo.com
Sat Mar 23 05:22:15 CET 2013


>You can use bytes() function:

>>>> bytes('%d' % 3,  'utf-8')
>b'3'

>-m
 
thanks this has solved everything. can i ask if this is an issue only in python 3 where sockets cant send strings? the docs state the argument is a string, but i believe that was for 2.7. I knew nothing about b'' or bytes() before today. thanks again
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130322/d4e4b916/attachment-0001.html>


More information about the Tutor mailing list