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

2018-10-07 Thread 2015
On 18-10-07 16.15, Ram Rachum wrote: > 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? An mmap object is one of the things you can make a memoryview of, although looking again, it s

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

2018-10-07 Thread 2015
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 __