On Wed, May 19, 2010 at 9:06 AM, alux <[email protected]> wrote:
> Any comment here?

(defn spawn-repl [socket]
  "spawns a repl on a given socket"
  (let [input (new LineNumberingPushbackReader
                   (new InputStreamReader (.getInputStream socket)))
        output (new PrintWriter (.getOutputStream socket) true)]
    (binding [*in*  input
              *out* output
              *err* output]
      (clojure.main/repl))))

I had the above amongst some sample code. I think it's originally from
the repl utils in contrib, but it gives you an example of usage. (Note
that it's always useful to do a directory search on both core and
contrib sources to see examples of particular features).

-Rgds, Adrian.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to