Re: non OO behaviour of file

2005-06-15 Thread Robin Becker
Jp Calderone wrote: > On Wed, 15 Jun 2005 16:38:32 +0100, Robin Becker <[EMAIL PROTECTED]> wrote: > >>Michael Hoffman wrote: >>. >> >>>Well, you could use python -u: >>> >> >>unfortunately this is in a detached process and I am just reopening stdout >>as an ordinary file so another process can

Re: non OO behaviour of file

2005-06-15 Thread Jp Calderone
On Wed, 15 Jun 2005 16:38:32 +0100, Robin Becker <[EMAIL PROTECTED]> wrote: >Michael Hoffman wrote: >. >> >> Well, you could use python -u: >> > >unfortunately this is in a detached process and I am just reopening stdout >as an ordinary file so another process can do tail -F on it. I imagine th

Re: non OO behaviour of file

2005-06-15 Thread Robin Becker
Michael Hoffman wrote: . > > Well, you could use python -u: > unfortunately this is in a detached process and I am just reopening stdout as an ordinary file so another process can do tail -F on it. I imagine ther ought to be an os dependant way to set the file as unbuffered, but can't reme

Re: non OO behaviour of file

2005-06-15 Thread Michael Hoffman
Robin Becker wrote: > I recently tried to create a line flushing version of sys.stdout using > > class LineFlusherFile(file): > def write(self,s): > file.write(self,s) > if '\n' in s: > self.flush() > > but it seems that an 'optimization' prevents the overriden wri

non OO behaviour of file

2005-06-15 Thread Robin Becker
I recently tried to create a line flushing version of sys.stdout using class LineFlusherFile(file): def write(self,s): file.write(self,s) if '\n' in s: self.flush() but it seems that an 'optimization' prevents the overriden write method from being used. I had