Re: Frustrating circular bytes issue

2012-06-26 Thread Hans Mulder
On 26/06/12 18:30:15, J wrote: > This is driving me batty... more enjoyment with the Python3 > "Everything must be bytes" thing... sigh... > I have a file that contains a class used by other scripts. The class > is fed either a file, or a stream of output from another command, then > interprets th

Re: Frustrating circular bytes issue

2012-06-26 Thread Stefan Behnel
J, 26.06.2012 18:30: > def _reader(self, file, size=4096, delimiter=r"\n{2,}"): > buffer_old = "" > while True: > buffer_new = file.read() > print(type(buffer_new)) > if not buffer_new: > break > lines = re.split(delimi

Re: Frustrating circular bytes issue

2012-06-26 Thread Robert Kern
On 6/26/12 5:30 PM, J wrote: This is driving me batty... more enjoyment with the Python3 "Everything must be bytes" thing... sigh... I have a file that contains a class used by other scripts. The class is fed either a file, or a stream of output from another command, then interprets that output