
[Moderator's note: "sgrep (structured grep) is a tool for searching text files and filtering text streams using structural criteria. The data model of sgrep is based on regions, which are non-empty substrings of text."] I swiged sgrep into python. This is all very much just a first crack to see how it would work. Modified sgrep a bit to avoid reading files from disk,fixed a memory leak and a GP fault. The test file was 4.7meg of SGML. These tests aren't very scientific but if I waited until everything was perfect, that might be a while. Source with VC6 work space and Linux Makefile http://www.dorb.com/darrell/ Be sure to look at this for new features. http://www.cs.helsinki.fi/~jjaakkol/sgrep/README.txt --Darrell <P><A HREF="http://www.dorb.com/darrell/">sgrep wrapper</A> - module to use the <A HREF="http://www.cs.helsinki.fi/~jjaakkol/sgrep/README.txt">sgrep</A> structured text/*ML search tool from within Python. (06-May-99) ##### Test sgrep Used 31 meg. The results are stored in an array class. python objects. ##### I believe thats the diff in memory and partly performance.
-- ----------- comp.lang.python.announce (moderated) ---------- Article Submission Address: python-announce@python.org Python Language Home Page: http://www.python.org/ Python Quick Help Index: http://www.python.org/Help.html ------------------------------------------------------------
participants (1)
-
Darrell