Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.071 X-Spam-Evidence: '*H*': 0.86; '*S*': 0.00; 'names.': 0.07; 'read.': 0.10; 'egg': 0.16; 'received:mindspring.com': 0.16; 'x-mailer:apple mail (2.1084)': 0.16; 'wrote:': 0.16; 'file,': 0.21; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; 'work,': 0.23; '(or': 0.23; 'unsure': 0.23; 'asked': 0.23; 'pm,': 0.24; 'aug': 0.24; 'changes,': 0.24; "python's": 0.24; 'preferred': 0.25; 'import': 0.28; '27,': 0.29; 'subject: .': 0.29; 'example': 0.30; 'folder.': 0.30; 'list': 0.32; 'words,': 0.32; 'received:24': 0.32; 'to:addr:python-list': 0.33; 'operating': 0.33; 'directory.': 0.34; 'folder': 0.35; 'unless': 0.36; 'charset :us-ascii': 0.36; 'file': 0.36; 'created': 0.36; 'but': 0.37; 'something': 0.37; 'could': 0.38; 'think': 0.38; 'should': 0.38; 'subject:: ': 0.39; 'header:Mime-Version:1': 0.39; 'systems,': 0.39; 'why': 0.39; 'to:addr:python.org': 0.39; 'might': 0.40; 'your': 0.61; 'header:Message-Id:1': 0.61; 'order': 0.62; 'luck': 0.68; '(still': 0.84; 'received:69.73': 0.84; 'setup.py,': 0.84; 'confirms': 0.91 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: Understanding .pth in site-packages From: Philip Semanchuk In-Reply-To: <2763f908-2feb-4d2f-b422-433de26b2868@glegroupsg2000goo.googlegroups.com> Date: Sat, 27 Aug 2011 14:07:02 -0400 Content-Transfer-Encoding: quoted-printable References: <31bef8dc-d804-454d-85c7-8de1663052a8@glegroupsg2000goo.googlegroups.com> <2763f908-2feb-4d2f-b422-433de26b2868@glegroupsg2000goo.googlegroups.com> To: python-list list X-Mailer: Apple Mail (2.1084) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - deimos.nocdirect.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - semanchuk.com X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 38 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1314468427 news.xs4all.nl 2480 [2001:888:2000:d::a6]:38740 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:12287 On Aug 27, 2011, at 1:57 PM, Josh English wrote: > Philip, >=20 > Yes, the proper path should be c:\dev\XmlDB, which has the setup.py, = xmldb subfolder, the docs subfolder, and example subfolder, and the = other text files proscribed by the package development folder. >=20 > I could only get it to work, though, by renaming the xmldb folder in = the site-packages directory, and deleting the egg file created in the = site-packages directory.=20 >=20 > Why the egg file, which doesn't list any paths, would interfere I do = not know. >=20 > But with those changes, the xmldb.pth file is being read. >=20 > So I think the preferred search order is: >=20 > 1. a folder in the site-packages directory > 2. an Egg file (still unsure why) > 3. A .pth file That might be implementation-dependent or it might even come down to = something as simple as the in which order the operating system returns = files/directories when asked for a listing. In other words, unless you = can find something in the documentation (or Python's import = implementation) that confirms your preferred search order observation, I = would not count on it working the same way with all systems, all = Pythons, or even all directory names. Good luck Philip=