REPOST: Re: pth files - can they prepend to sys.path?
Alex Martelli
aleax at aleax.it
Fri Dec 28 10:42:17 EST 2001
"Skip Montanaro" <skip at pobox.com> wrote in message
news:mailman.1009549952.9614.python-list at python.org...
>
> Is it possible to force a directory mentioned in a .pth file to be
inserted
> at the beginning of sys.path instead of appended to the end?
Only by editing your site.py, I fear (or, by doing it in siteconfigure.py,
probably better). Function site.addpackage, as it stands, uses
sys.path.append, so directories thus added won't get to the start
of sys.path, but always to the end.
Alex
========= WAS CANCELLED BY =======:
Path: news.sol.net!spool0-milwwi.newsops.execpc.com!newsfeeds.sol.net!newspump.sol.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!enews.sgi.com!news-xfer.nuri.net!feeder.kornet.net!news1.kornet.net!ua4canc3ll3r
From: "Alex Martelli" <aleax at aleax.it>
Newsgroups: comp.lang.python
Subject: cmsg cancel <a0i3sm$fql$1 at serv1.iunet.it>
Control: cancel <a0i3sm$fql$1 at serv1.iunet.it>
Date: Mon, 31 Dec 2001 05:00:43 GMT
Organization: A poorly-installed InterNetNews site
Lines: 2
Message-ID: <cancel.a0i3sm$fql$1 at serv1.iunet.it>
NNTP-Posting-Host: 211.57.49.2
X-Trace: news2.kornet.net 1009775259 27193 211.57.49.2 (31 Dec 2001 05:07:39 GMT)
X-Complaints-To: usenet at news2.kornet.net
NNTP-Posting-Date: Mon, 31 Dec 2001 05:07:39 +0000 (UTC)
X-No-Archive: yes
X-Unac4ncel: yes
X-Commentary: I love NewsAgent 1.10 and the Sandblaster Cancel Engine Build 74 (19 March 1999)
This message was cancelled from within Mozilla.
More information about the Python-list
mailing list