Re: writing consecutive data to subprocess command 'more'

2009-05-03 Thread SanPy
Hmm, it works as long as the pager command is available on the system. I created a test file to explain what I mean. You can find it here: http://gist.github.com/105880 The 'pager' command is on purpose a command that is not available on the system. It should fall back to sys.stdout in the write m

Re: writing consecutive data to subprocess command 'more'

2009-05-02 Thread SanPy
Thanks, that works beautifully! Regards, Sander On 2 mei, 22:35, "Gabriel Genellina" wrote: > En Sat, 02 May 2009 15:53:17 -0300, SanPy escribió: > > > > > > > I have this method that prints a given text via a subprocess command > > 'more' . It is like this: > > > def print_by_page(text): > >  

Re: writing consecutive data to subprocess command 'more'

2009-05-02 Thread Piet van Oostrum
> SanPy (S) wrote: >S> I have this method that prints a given text via a subprocess command >S> 'more' . It is like this: >S> def print_by_page(text): >S> if hasattr(sys.stdout, 'isatty') and sys.stdout.isatty(): >S> viewer = 'more -EMR' >S> proc = subprocess.Popen([viewe

Re: writing consecutive data to subprocess command 'more'

2009-05-02 Thread Gabriel Genellina
En Sat, 02 May 2009 15:53:17 -0300, SanPy escribió: I have this method that prints a given text via a subprocess command 'more' . It is like this: def print_by_page(text): if hasattr(sys.stdout, 'isatty') and sys.stdout.isatty(): viewer = 'more -EMR' proc = subprocess.Popen