From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53562 invoked by alias); 13 Feb 2017 19:31:25 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 53528 invoked by uid 89); 13 Feb 2017 19:31:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.7 required=5.0 tests=AWL,BAYES_50,KAM_INFOUSMEBIZ autolearn=no version=3.3.2 spammy=H*M:info, caught, H*r:sk:kawa@so, H*r:ip*0.0.0.0 X-HELO: burlywood.ash.relay.mailchannels.net Received: from burlywood.ash.relay.mailchannels.net (HELO burlywood.ash.relay.mailchannels.net) (23.83.222.26) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 13 Feb 2017 19:31:12 +0000 X-Sender-Id: hostpapa|x-authuser|peter@peterlane.info Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 5B49A1845EC for ; Mon, 13 Feb 2017 19:31:08 +0000 (UTC) Received: from hp114.hostpapa.com (unknown [100.96.6.211]) by relay.mailchannels.net (Postfix) with ESMTPA id 6135E185C64 for ; Mon, 13 Feb 2017 19:31:07 +0000 (UTC) X-Sender-Id: hostpapa|x-authuser|peter@peterlane.info Received: from hp114.hostpapa.com (hp114.hostpapa.com [172.20.64.132]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.7.16); Mon, 13 Feb 2017 19:31:08 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: hostpapa|x-authuser|peter@peterlane.info X-MailChannels-Auth-Id: hostpapa X-MC-Loop-Signature: 1487014267607:2343574022 X-MC-Ingress-Time: 1487014267607 Received: from host86-137-207-130.range86-137.btcentralplus.com ([86.137.207.130]:46886 helo=[192.168.1.64]) by hp114.hostpapa.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87) (envelope-from ) id 1cdML2-003Hrq-Gw for kawa@sourceware.org; Mon, 13 Feb 2017 19:31:05 +0000 Subject: Re: import path vs CLASSPATH To: kawa@sourceware.org References: <4f61b6b2-78f7-a327-6eb3-7778eab00233@peterlane.info> From: Peter Lane Message-ID: Date: Mon, 13 Feb 2017 19:31:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=0.6 X-AuthUser: peter@peterlane.info X-IsSubscribed: yes X-SW-Source: 2017-q1/txt/msg00051.txt.bz2 On 08/02/17 21:41, Per Bothner wrote: > Depends what you mean by "the program". The path is relative to the > *importing* module. > I.e. the source file that contains the import or require form. Yes, this makes more sense now. It is quite logical, although I did get caught out even after looking at the manual - by thinking the import.path was analogous to CLASSPATH. > Perhaps changing "If the resulting filename is relative, then it is > resolved relative to the current root." > adding ", which is derived from the name of the source file containing > the import/require" > might make it clearer? That would help make things clearer. I also think the point should be flagged up earlier - the third paragraph could include a similar phrase: "Each path element is combined ... to produce a filename; relative path elements are /relative to the source file containing the import/require/." -- Peter Lane http://peterlane.info/scheme.html