But finding the source path from the namespace is what I can't figure out. You can look at metadata on a var, and this has a :file field, but typically :file says NO_SOURCE_PATH.
On Dec 28, 12:33 am, Emeka <emekami...@gmail.com> wrote: > Hello nchubrich, > > I thinking that you can do this with easy using namespace which would lead > you to resolve the file name and then figure out the path. > > Emeka > > On Mon, Dec 28, 2009 at 2:43 AM, nchubrich <nicholas.chubr...@gmail.com>wrote: > > > Does anyone know how to dynamically access the pathname for a > > particular piece of code? I.E., I'd like to be able to write a > > function that can be called in any context and returns the pathname > > for the code it was called in. (My intended use for this is to > > develop a testing package; I want to figure out an appropriate place > > to save the test files.) > > > -- > > 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 patient with > > your first post. > > To unsubscribe from this group, send email to > > clojure+unsubscr...@googlegroups.com<clojure%2bunsubscr...@googlegroups.com> > > For more options, visit this group at > >http://groups.google.com/group/clojure?hl=en > > -- 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 patient with your first post. 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