Pat <pat@...> writes:
>So I take it you want an interactive interpreter (with prompts) but one that
>does not exit when stdin is closed?
Yes, that's exactly what I want.
It would also be nice if when the user hit <Control D> she received some sort of
It would also be nice if I could control the prompt string, but that would just
be a piece of extra fluff.
A more serious problem has nothing to do with Beanshell but is a Java issue. As
near as I can see there seems to be no portable way to get user terminal input
more than once. That is, once the user hits <Control D>, I do not see how I can
again access her terminal. Under Unix, Linux or Macintosh System X, I can
construct the second and subsequent interactive bsh.Interpreters from an
InputStreamReader that I wrap around a new BufferedInputStream that I wrap
around a FileInputStream that I contruct from "/dev/tty", but I don't know how
to do that under Windows.
798 Barron Avenue
Palo Alto CA 94306-3109