String Question
Iain King
iainking at gmail.com
Fri Jun 30 04:09:43 EDT 2006
Tim Roberts wrote:
> "Iain King" <iainking at gmail.com> wrote:
> >
> >You probably want:
> >
> >s.sendto('\xff'*6 + ('\x%s\x%s\x%s\x%s\x%s\x%s' % (str01, str02, str03,
> > sttr04, str05, str06))*16, ('192.168.1.255', 80))
>
> You probably should TRY suggestions before you post them. That will get an
> "invalid \x escape". \x must be followed by exactly two hex digits. You
> can't build up an escape sequence like this.
> --
> - Tim Roberts, timr at probo.com
> Providenza & Boekelheide, Inc.
You're right. I'd foolishly assumed that \x was just another character
code, like \t or \n. Apologies.
Iain
More information about the Python-list
mailing list