PEP 358 and operations on bytes

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Wed Oct 4 22:09:07 CEST 2006


A simple RE engine written in Python can be short, this is a toy:
http://paste.lisp.org/display/24849
If you can't live without the usual syntax:
http://paste.lisp.org/display/24872

Paul Rubin:
> Yes, I want something like that all the time for file scanning without
> having to resort to parser modules or hand coded automata.

Once read a file is a string or unicode. On them you can use normal
REs. If you need list-REs you probably slit the data in some parts. Can
you show one or more examples where you think simple list-REs can be
useful?

Bye,
bearophile




More information about the Python-list mailing list