bitarray python 3 port

Roland Puntaier roland.puntaier at
Sat Jul 23 12:30:41 EDT 2011

Hi Ilan,

I've ported your bitarray package to python 3.
Your thorough test script helped a lot. It does run through with python 
 > 2.6 and python 3.x for Linux and Windows. Python 2.5 I didn't try.
The sample does not work with python3, because scipy weave is 
not yet supported

- I've added frombytes() and tobytes(). fromstring() and tostring() do 
encode() and forward to them.
- fromfile() does not use PyObject_AsFileDescripter and read directly 
into buffer, because of problems to sync file position with python's
   A temporary buffer is created then copied into the bitarray buffer. copies the (Linux) or _bitarray.pyd (Windows) into 
site-packages (3.2) or dist-packages (<3.2), but not into 
or Python3.x/DLLs. As a result you might get "no module named _bitarray".
Setting PYTHONPATH to where bitarray is or adding that path to sys.path 
helps. Else a symbolic link or copy in lib-dynload (Linux) or 
Python3.x/DLLs could be created.

If you could add this to pypi, it would be great.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bitarray-0.3.6.tar.gz
Type: application/x-gzip
Size: 50150 bytes
Desc: not available
URL: <>

More information about the Python-list mailing list