title: how to convert struct.pack
body: <p>I'm currently converting a working project from python 2.7 to python 3.6, and the issue that i'm running into is that whenever struct.pack() is used as an increment I get the error <strong>"must be str not bytes"</strong>.</p>
  
  <pre><code>    def _cmdWCS(self, cmdBytes):
          '''Returns cmdBytes with chksum appended'''
          checksum = self._calcChkSum(cmdBytes)
          cmdBytes += struct.pack('B', checksum)
          return cmdBytes
  </code></pre>
  
  <pre><code>
          cmd = '\xA0'
          cmd += struct.pack('BBBBBBB', 0b01,t1,t0,p1,p0,f1,f0)
          cmd = self._cmdWCS(cmd)
  
  </code></pre>
  
  <p>Is there anyway to convert these into strings and then bytes again so that I can recover the data properly? I've tried str(byte_string, 'utf-8') and it says I have an improper start byte. </p>