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
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):
> >
> 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
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