[Python-ideas] Support parsing stream with `re`

Ram Rachum ram at rachum.com
Sun Oct 7 10:15:48 EDT 2018


I tested it now and indeed bytes patterns work on memoryview objects. But
how do I use this to scan for patterns through a stream without loading it
to memory?

On Sun, Oct 7, 2018 at 4:24 PM <2015 at jmunch.dk> wrote:

> On 18-10-07 15.11, Ram Rachum wrote:
>
>  > Unfortunately, it's not helpful. I was developing a solution similar
> to yours before I came to the conclusion that a multilne regex would be
> more elegant.
>
>
> How about memory mapping your 1GB file?
>
> bytes patterns work on memoryviews.
>
> regards, Anders
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20181007/826b3f12/attachment.html>


More information about the Python-ideas mailing list