[Rd] stdout == 'Terminal' or 'File' {was 'bad interaction ...'}
Martin Maechler
maechler at stat.math.ethz.ch
Wed May 12 09:24:55 CEST 2004
>>>>> "MartinS" == Martin Schlather <schlather at cu.lu>
>>>>> on Wed, 12 May 2004 09:15:17 +0100 writes:
MartinS> Dear Ben,
MartinS> I do not know how to solve the general problem that
MartinS> backspaces cause within Sweave, but which are
MartinS> needed to implement running counters.
aha! now I understand more what you are talking about.
This is a more interesting problem, in general: It's not quite a
matter of if(interactive()) that Ben tried, but really you want
to find out if the stdout() connection you are using is a normal file
(where you don't need or want a running counter) or a
user terminal where Martin Schlather applied the 1^H2^H... ('1' Backspace
'2' Backspace ..) trick.
Any ideas what can be done here, using our current connection
tools -- or is there the need for something new?
Interesting topic!
Martin Mächler
PS. I know that strictly speaking the subject question is
non-sense, since, at least on Unix-alikes, a console is a
special file as well, and stdout is always a file.
More information about the R-devel
mailing list