Kenny Tilton wrote:
Peter Herth wrote:
On 2/2/06, Kenny Tilton ktilton@nyc.rr.com wrote:
Is there some reason the error stream from Tk is not being used? In Celtic I bound that to a second global and read that (with read-line, not read since the error output is not Lisp friendly) before trying to read the regular stream.
As it is read-data just flails away at error text until it hits something that upsets the reader, such as a comma.
Well, there is no deep reason - besides I do not know offhand how the support for a seperate error stream across all the lisps Ltk runs on is. For sure, it probably would remove some of the weird errors of Ltk when Tk sends something unreadable...
Here is the change I made for Celtic:
#+allegro (multiple-value-bind (stream error-stream process-id) (excl:run-shell-command #+mswindows fullstring #-mswindows (apply #'vector program program args) :input :stream :output :stream :error-output :stream :wait wt) (declare (ignorable dummy error-stream process-id)) (trc "doexec!!!> " stream error-stream process-id) (if stream (progn (setf *ewish* error-stream) stream) (error "Cannot create WISH process.")))))
Then before reading *wish* (this of course in the day when that was the stream):
(loop while (peek-char-no-hang *ewish*) do (break "ewish!!!!!!!> ~a" (read-line *ewish* nil nil)))
That looks like it could be a little smarter and not break until all the error output was read, but that is the general idea.
kt _______________________________________________ ltk-user site list ltk-user@common-lisp.net http://common-lisp.net/mailman/listinfo/ltk-user
FYI I have now added the above to my copy and it does not seem to be picking up the unreadable TK stuff from the error-stream. Still investigating, but I wanted to give you a heads up in case you were playing with it. kt