format in struct .pack

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • praveen0437
    New Member
    • Mar 2007
    • 8

    format in struct .pack

    hi
    i know about format argument in pack and unpack like b h i etc but in some cases i am getting < or = symbols along with them what does they signifies
    for example struct.pack( "<cI", 'n', var1 )
  • ghostdog74
    Recognized Expert Contributor
    • Apr 2006
    • 511

    #2
    Originally posted by praveen0437
    hi
    i know about format argument in pack and unpack like b h i etc but in some cases i am getting < or = symbols along with them what does they signifies
    for example struct.pack( "<cI", 'n', var1 )
    My advice : always read the docs. See here . The '<' and '=' are stated in that doc. '<' and '>' has to do with byte order. (little and big endian)

    Comment

    Working...