How to read a txt file?

2013-02-01 Thread Roger75
I'd like to read a txt file using clojure. How do I do that? Any examples? -- -- 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 Note that posts from new members are moderated - please be

Re: How to read a txt file?

2013-02-01 Thread Baishampayan Ghose
clojure.core/slurp Sent from phone. Please excuse brevity. On 1 Feb 2013 18:13, Roger75 rcana...@gmail.com wrote: I'd like to read a txt file using clojure. How do I do that? Any examples? -- -- You received this message because you are subscribed to the Google Groups Clojure group. To

Re: How to read a txt file?

2013-02-01 Thread AtKaaZ
there are some examples here: http://clojuredocs.org/clojure_core/clojure.core/slurp http://clojuredocs.org/clojure_core/clojure.java.io/reader On Fri, Feb 1, 2013 at 1:44 PM, Baishampayan Ghose b.gh...@gmail.comwrote: clojure.core/slurp Sent from phone. Please excuse brevity. On 1 Feb

Re: How to read a txt file?

2013-02-01 Thread Zack Maril
Look at slurp. http://clojuredocs.org/clojure_core/1.2.0/clojure.core/slurp On Friday, February 1, 2013 4:17:43 PM UTC+4, Roger75 wrote: I'd like to read a txt file using clojure. How do I do that? Any examples? -- -- You received this message because you are subscribed to the Google Groups

Re: How to read a txt file?

2013-02-01 Thread Roger75
Hi, I'm trying to use this console: http://tryclj.com/ the command I wrote: (slurp C:\\Users\\User1\\teste\\teste.txt) I get this: java.lang.RuntimeException: Unable to resolve symbol: in this context On Friday, February 1, 2013 10:17:43 AM UTC-2, Roger75 wrote: I'd like to read a txt file

Re: How to read a txt file?

2013-02-01 Thread Andy Fingerhut
Roger, tryclj.com is limited in what it can do. The Clojure code you type in there is running on the web server across the network from you, not on your own local machine. That file isn't accessible there. Also for that reason many symbols are not allowed to be used in tryclj.com

Re: How to read a txt file?

2013-02-01 Thread greg r
slurp works well, however, it reads the file in as a single string. The result may not be readily useable depending on what you are doing. I read in text files using clojure.java.io functions plus the core function line-seq. What you get is a sequence whose elements are the individual lines