[ZODB-Dev] Re: [Zope-Checkins] CVS: ZEO/ZEO - start.py:1.60

Guido van Rossum guido@python.org
Mon, 20 Jan 2003 14:18:38 -0500


> I mentionned sys.path because directory() is called to insert something
> into sys.path.
> 
> I intended that fix. There are other ways to do it of course.
> 
> In the previous code, directory() removed n components from the path p,
> and (mostly) correctly treated the case where, while trying to remove a
> component, it encoutered '' or '.', in which case it called os.getcwd()
> to find the current path and continue. But if you pass it
> 'lib/python/ZEO/start.py' with n=2, it returns 'lib/python'. Thus
> directory() may return an absolute or a local path.
> 
> Jeremy proposes that the caller of directory() then call
> os.path.abspath() on the result. This works, but I prefer to have
> directory() always do all the work needed.
> 
> Note that I did a minimal fix, but maybe I should have rewritten
> directory() because now the part that tests if not d or d == '.' is
> unneeded...

Ah, now I understand.  Thanks.

Since start.py is no longer maintained, I don't care about removing
the redundancy from directory().  In ZODB 3.2 we're promoting
runzeo.py and in ZODB 3.3, start.py will be removed -- as will the
ZEO1 subdirectory.

--Guido van Rossum (home page: http://www.python.org/~guido/)