pygrep

David LeBlanc whisper at oz.nospamnet
Fri May 4 13:59:59 EDT 2001


In article <4A256A40.0036180F.00 at ssxrgw01.savillemailbr.com>, 
Steven_Shaw at adc.com says...
> 
> 
> Hi there,
> 
> I have converted an old Perl4 script to Python2.1. It is a simple tool to
> replace grep. My new Python script currently runs about twice as slow as the old
> Perl version. I've tried afew things from the Python FAQ, but nothing seems to
> improve things much. Can anyone suggest performance improvements for this code?
> 
> Here's the original Perl source code (pgrep):
> 
> (See attached file: pgrep)
> 
> Here's the Python source code (pygrep):
> 
> (See attached file: pygrep)
> 
> cheers,
> 
> Steve.
> 
> [application/octet-stream]
> 
> [application/octet-stream]
> 
Have you looked at the grep.py that comes with zope?

Dave LeBlanc



More information about the Python-list mailing list