On 2007-05-24, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> hello all
>
> i am relatively new to python, catching on, but getting stuck on
> simple thing:
>
> i have two string bytes i need to push into a single (short) int, like
> so in c:
>
>    temp = strBuf[2];
>
>    temp = (temp<<7)+(strBuf[1]);

  (ord(strBuf[2])<<7) + ord(strBuf[1])

-- 
Grant Edwards                   grante             Yow! This PORCUPINE knows
                                  at               his ZIPCODE ... And he has
                               visi.com            "VISA"!!
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to