开发者

Importing C python module in Google App Engine

开发者 https://www.devze.com 2023-02-15 16:27 出处:网络
I am developing an application on Google app engine using Python. I want to use editdist feature of Python and for that reason I am importing editdist C python module in my开发者_StackOverflow中文版 p

I am developing an application on Google app engine using Python. I want to use editdist feature of Python and for that reason I am importing editdist C python module in my开发者_StackOverflow中文版 program, but it is showing that module editdist does not exist.

When I import editdist for my local application it is working fine but not for Google app engine application.

Can anyone suggest me a method to import this module?


App Engine is a "pure python" environment, and you cannot use any C extensions or other code that must be compiled.

There is therefore no way to use this program on App Engine, and all of the competing "production quality" python libraries I found were implemented as C modules.

There do exist alternate implementations of the Levenshtein distance algorithm, though none are as nearly as fast as editdist. These more naïve implementations might still be acceptable depending upon your needs.


Here could be couple alternatives that are implemented with Python (I haven't tested them myself):

  • http://www.korokithakis.net/node/87
  • http://code.activestate.com/recipes/576874-levenshtein-distance/
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号