title: How to pack a UUID into a struct in Python?
body: <p>I have a UUID that I was thinking of packing into a struct using UUID.int, which turns it into a 128-bit integer. But none of the struct format characters are large enough to store it, how to go about doing this? </p>
  
  <p>Sample code:</p>
  
  <pre><code>s = struct.Struct('L')
  unique_id = uuid.uuid4()    
  tuple = (unique_id.int)
  packed = s.pack(*tuple)
  </code></pre>
  
  <p>The problem is, struct format 'L' is only 4 bytes...I need to store 16. Storing it as a 32-char string is a bit much.</p>