On 29 Jul 2012, at 10:56 AM, praveen krishna <praveenchitne...@gmail.com> wrote:
> What do u mean by building a module.I don't know how to built a module I just 
> extracted the folder and stored it in applications/yourapp/modules and tried 
> to import it.

Levenshtein is written in C, and must be compiled before it can be imported.

python setup.py build

should do the trick. You'll find the result (possibly named Levenshtein.so) in 
the resulting build directory. Put that in site-packages/.

> On Sun, Jul 29, 2012 at 7:52 PM, Jonathan Lundell <jlund...@pobox.com> wrote:
> On 29 Jul 2012, at 10:22 AM, praveen krishna <praveenchitne...@gmail.com> 
> wrote:
>>     How to import the Levenshtein in controller of web2py actullaý I have 
>> downloaded the tar.bz2 folder of levenstein from 
>> http://code.google.com/p/pylevenshtein/ extracted in web2py/site-packages 
>> and used the command import Levenshtein but it dosen't work and even I tried 
>> by extracting in applications/yourapp/modules and used the command func = 
>> local_import('func') but this also dosen't work I am getting the error
> 
> 
> Did you build the module?
>> 


-- 



Reply via email to