[racket] How to get current directory in the module file?
Hi,
For example, I have two module a and other-directory/b
a.rkt
----- begin of file ---
#lang racket
(define cwd (current-directory))
(provide cwd)
------- end of file ----
other-directory/b.rkt
---- begin ---
#lang racket
(require "a.rkt)
(print cwd)
---- end ---
To execute racket b.rkt, it will print "other-directory" instead of the
directory of a.rkt.
How to get the directory of a.rkt?
Thanks,
Haiwei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121214/ef8a4f52/attachment.html>