sending image pil 1.1.5 by network

maxime_phan at hotmail.com maxime_phan at hotmail.com
Mon Nov 20 23:14:23 EST 2006


it works with base64 thanks alot!!!, I know it's not very good
solution, but it's for a multiplayer checkers game with webcam, and I
already use enet everywhere
Fredrik Lundh a écrit :

> maxime_phan at hotmail.com wrote:
>
> > Hello everyone, I'm trying to make a webcam software with python, pil
> > library and enet (networking)
> > Now I have in the client my pil image get from webcam, ready to be send
> > by network.
> >
> > I do that:
> >
> > self.peer.send(0, image.tostring(), enet.FLAG_RELIABLE)
> >
> > and I have this error:
> > TypeError: argument 2 must be string without null bytes, not str
> >
> > does someone know what kind of convertion I should do to make it work?
>
> "self.peer", whatever that is, doesn't seem to support transfer
> of binary data.  better talk to the vendor.
>
> (you could in theory use base64 encoding or some other text-only
> representation of binary data, but that doesn't seem like a very
> practical solution for a webcam application.)
> 
> </F>




More information about the Python-list mailing list