Prev: Function that knows its argument's variable name
Next: What does Error: 'module' object is not callable Mean?
From: _wolf on 14 Mar 2010 11:57 i just discovered http://code.google.com/p/re2, a promising library that uses a long-neglected way (Thompson NFA) to implement a regular expression engine that can be orders of magnitudes faster than the available engines of awk, Perl, or Python. so i downloaded the code and did the usual sudo make install thing. however, that action had seemingly done little more than adding /usr/ local/include/re2/re2.h to my system. there seemed to be some `*.a file in addition, but then what is it with this *.a extension? i would like to use re2 from Python (preferrably Python 3.1) and was excited to see files like make_unicode_groups.py in the distro (maybe just used during the build process?). those however were not deployed on my machine. how can i use re2 from Python? (this message appeared before under http://stackoverflow.com/questions/2439345/is-it-possible-to-use-re2-from-python and, even earlier, http://groups.google.com/group/re2-dev/t/59b78327ec3cca0a)
From: Kev Dwyer on 14 Mar 2010 14:18 On Sun, 14 Mar 2010 08:57:36 -0700, _wolf wrote: > > how can i use re2 from Python? > Hello Wolf, There's a recent thread about this on the python-dev list, Unfortunately it seems to suggest that there are no Python bindings at present. Cheers, Kev
From: Vlastimil Brom on 14 Mar 2010 16:49 2010/3/14 _wolf <wolfgang.lipp(a)gmail.com>: >... > i would like to use re2 from Python (preferrably Python 3.1) and was > excited to see files like make_unicode_groups.py in the distro (maybe > just used during the build process?). those however were not deployed > on my machine. >... > If you would need a re engine with features like unicode rangees, script, and character properties classes and many others, you may try the proposed implementation of the re library currently available in python issue tracker: http://bugs.python.org/issue2636 I am personally more than satisfied with this development version sofar, however, as some new feature like unlimited lookarounds etc. suggest, it is a classic backtracking engine (as opposed to re2, if you need this very implementation). hth vbr
From: _wolf on 14 Mar 2010 17:40 i am afraid that thread goes straight perpendicular to what re2 is supposed to be, or do. my suggestion for these folks would be to create a new, clean interface to stop the violence that comes with the Python ``re`` interface, and open the thing up so one can plug in ``re`` implementations as are needed. when i absolutely need a feature, i can always go to the slower machine; simpler regular expressions could be dealt with more efficiently.
From: _wolf on 14 Mar 2010 17:40 > There's a recent thread about this on the python-dev list, pointers? i searched but didnt find anything.
|
Next
|
Last
Pages: 1 2 Prev: Function that knows its argument's variable name Next: What does Error: 'module' object is not callable Mean? |