Bit substring search

Kris Kennaway kris at FreeBSD.org
Tue Jun 24 17:31:17 CEST 2008


bearophileHUGS at lycos.com wrote:
> Kris Kennaway:
>> Unfortunately I didnt find anything else useful here yet :(
> 
> I see, I'm sorry, I have found hachoir quite nice in the past. Maybe
> there's no really efficient way to do it with Python, but you can
> create a compiled extension, so you can see if it's fast enough for
> your purposes.
> To create such extension you can:
> - One thing that requires very little time is to create an extension
> with ShedSkin, once installed it just needs Python code.
> - Cython (ex-Pyrex) too may be okay, but it's a bit trikier on Windows
> machines.
> - Using Pyd to create a D extension for Python is often the faster way
> I have found to create extensions. I need just few minutes to create
> them this way. But you need to know a bit of D.
> - Then, if you want you can write a C extension, but if you have not
> done it before you may need some hours to make it work.

Thanks for the pointers, I think a C extension will end up being the way 
to go, unless someone has beaten me to it and I just haven't found it yet.

Kris



More information about the Python-list mailing list