title: How to write 1 byte to a binary file?
body: <p>I'm trying to write just one byte to a file in Python.</p>
  <pre><code>i = 10
  fh.write( six.int2byte(i) )
  </code></pre>
  <p>Will output '0x00 0x0a'</p>
  <pre><code>fh.write( struct.pack('i', i) )
  </code></pre>
  <p>Will output '0x00 0x0a 0x00 0x00'</p>
  <p>I want to write a single byte with the value 10 to the file.</p>