Repl entry point that provides convenient overriding of input, output, and err streams via sequential keyword-value pairs. Default values for :in, :out, and :err are streams associated with System/in, System/out, and System/err using UTF-8 encoding. Also supports all the options provided by clojure.contrib.repl-ln/repl.
; clojure/contrib/repl_ln.clj:119 (defn stream-repl [& options] (let [enc RT/UTF8 {:keys [in out err] :or {in (LineNumberingPushbackReader. (InputStreamReader. System/in enc)) out (OutputStreamWriter. System/out enc) err (PrintWriter. (OutputStreamWriter. System/err enc))}} (apply hash-map options)] (binding [*in* in *out* out *err* err] (apply repl options))))
Copyright (c) Rich Hickey. All rights reserved.
The use and distribution terms for this software are covered by the Eclipse Public License 1.0, which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.