Python interpreter and script outputs different results
<p>I have installed Python 2.7.12. I have tried to write some simple script and I got weird result so I run python interpreter and to my surprise I got different results. Here is my script:</p>

<pre><code>import binascii
import bitarray

a = bitarray.bitarray(1)
a[0] = 0
print a
crc = binascii.crc_hqx(a, 0x0000)
print crc

b = bitarray.bitarray(1)
b[0] = 0
print b
crc = binascii.crc_hqx(b, 0x0000)
print crc
</code></pre>

<p>The output of above script is as follows:</p>

<pre><code>bitarray('0')
0
bitarray('0')
33032
</code></pre>

<p>Value 33032 is wrong that is why I decided to check it using python interpreter and thats what I get:</p>

<pre><code>Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; import binascii
&gt;&gt;&gt; import bitarray
&gt;&gt;&gt; a = bitarray.bitarray(1)
&gt;&gt;&gt; a[0] = 0
&gt;&gt;&gt; print a
bitarray('0')
&gt;&gt;&gt; crc = binascii.crc_hqx(a, 0x0000)
&gt;&gt;&gt; print crc
0
&gt;&gt;&gt; b = bitarray.bitarray(1)
&gt;&gt;&gt; b[0] = 0
&gt;&gt;&gt; print b
bitarray('0')
&gt;&gt;&gt; crc = binascii.crc_hqx(b, 0x0000)
&gt;&gt;&gt; print crc
0
&gt;&gt;&gt; 
</code></pre>

<p>I sit in front of the desktop and struggle to find out what is wrong.</p>

<p>I use <code>bitarray</code> version 0.8.1.</p>