On Fri, 3 Apr 2009 07:20:39 -0700 (PDT) Daniel Jomphe <danieljom...@gmail.com> wrote: > > Since I can't find the way to solve this issue, let's tackle it at a > more fundamental level. > > First, I need to make sure I can print to standard output without > using *out*, so I can later, temporarily bind *out* to something else. > Also, I don't want to print directly to System/out. Later, I'll need > it to be wrapped into something that gives it a proper encoding. > > user=> (import '(java.io PrintWriter PrintStream)) > nil > user=> (.print (PrintWriter. (PrintStream. System/out) true) > "bonjour") > nil > > Do you know how to make this work? >
I'm not sure if this is what you're asking, but... Could you just make a new Var (like *always-stdout* or something) and assign *out* to it at program start? This way the dynamic bindings on *out* don't affect your new Var and you can continue using it to access the "real" stdout. I haven't tested this, just a suggestion :) -Kyle --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---