Re: Style help for a Smalltalk-hack

Discussion in 'Python' started by Travis Griggs, Oct 23, 2012.

  1. On Oct 22, 2012, at 6:33 PM, MRAB <> wrote:

    > Another way you could do it is:
    >
    > while True:
    > chunk = byteStream.read(4)
    > if not chunk:
    > break
    > ...
    >
    > And you could fetch multiple signatures in one read:
    >
    > signatures = list(struct.unpack('>{}I'.format(valveCount), byteStream.read(4 * valueCount)))


    Thanks, both great ideas. Still does the read/decode slightly different between the different sites, but at least it's localized better. Much appreciated.

    --
    Travis Griggs
    "History has a habit of changing the people who think they are changing it." -Terry Pratchett
    Travis Griggs, Oct 23, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Travis Griggs

    Style help for a Smalltalk-hack

    Travis Griggs, Oct 23, 2012, in forum: Python
    Replies:
    0
    Views:
    124
    Travis Griggs
    Oct 23, 2012
  2. MRAB
    Replies:
    0
    Views:
    112
  3. Dennis Lee Bieber

    Re: Style help for a Smalltalk-hack

    Dennis Lee Bieber, Oct 23, 2012, in forum: Python
    Replies:
    0
    Views:
    219
    Dennis Lee Bieber
    Oct 23, 2012
  4. Travis Griggs

    Re: Style help for a Smalltalk-hack

    Travis Griggs, Oct 23, 2012, in forum: Python
    Replies:
    0
    Views:
    147
    Travis Griggs
    Oct 23, 2012
  5. Ian Kelly

    Re: Style help for a Smalltalk-hack

    Ian Kelly, Oct 23, 2012, in forum: Python
    Replies:
    0
    Views:
    149
    Ian Kelly
    Oct 23, 2012
Loading...

Share This Page