<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">In a.rkt:<br>
<br>
#lang racket<br>
(require racket/runtime-path)<br>
(define-runtime-path cwd ".")<br>
(provide cwd)<br>
<br>
On 12/14/2012 12:55 AM, Haiwei Zhou wrote:<br>
</div>
<blockquote
cite="mid:CABLXuO9TbTP1HmW4hw5cai_Hi=LAnmn80bqmcKyrguNv=zo_9Q@mail.gmail.com"
type="cite">Hi,<br>
<br>
For example, I have two module a and other-directory/b<br>
<br>
a.rkt<br>
----- begin of file ---<br>
<br>
#lang racket<br>
<br>
(define cwd (current-directory))<br>
<br>
(provide cwd)<br>
<br>
------- end of file ----<br>
<br>
other-directory/b.rkt<br>
---- begin ---<br>
#lang racket<br>
<br>
(require "a.rkt)<br>
<br>
(print cwd)<br>
---- end ---<br>
<br>
To execute racket b.rkt, it will print "other-directory" instead
of the directory of a.rkt.<br>
<br>
How to get the directory of a.rkt?<br>
<br>
<br>
Thanks,<br>
Haiwei<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">____________________
Racket Users list:
<a class="moz-txt-link-freetext" href="http://lists.racket-lang.org/users">http://lists.racket-lang.org/users</a>
</pre>
</blockquote>
<br>
</body>
</html>