Hi - I noticed that while http://clojure.org/api#toc16 indicates:
  *file*
  The path of the file being evaluated, as a String.
  Evaluates to nil when there is no file, eg. in the REPL.

It actually seems to evaluate to "NO_SOURCE_FILE".

I'm trying to write a quick and dirty logger that logs to the current
directory, or to File.createTempFile if I'm in a REPL.  Should I rely
on the value of *file* being the above string?  Or is there some other
way to determine if I'm in a REPL or not?  (I guess I could check if
*file* exists, or if it contains a valid file separator, or
something...)

- Korny

-- 
Kornelis Sietsma  korny at my surname dot com
"Every jumbled pile of person has a thinking part
that wonders what the part that isn't thinking
isn't thinking of"

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to