title: Python, cast Integer to bytes.
body: <p>i am newbie in python, and cannot do some easy stuf.
  I have a code from java</p>
  
  <pre><code>raw[j] = (byte) (chksum &amp; 0xff)
  raw[j + 1] = (byte) (chksum &gt;&gt; 0x08 &amp; 0xff)
  raw[j + 2] = (byte) (chksum &gt;&gt; 0x10 &amp; 0xff)
  raw[j + 3] = (byte) (chksum &gt;&gt; 0x18 &amp; 0xff)
  </code></pre>
  
  <p>Where raw is a array of bytes
  I need to do it in python. But how can i cast int to bytes?
  And maybe anybody knows where can i get the library for using Blowfish crypting?</p>