mς MγΈEc@s2dZdkZdd„Zdfd„ƒYZdS(s0Utilities for setting up the server environment.NicCsZ|}xM|oEtii|ƒ}| p |djotiƒ}n|d8}q W|S(s*Return the ancestor of p from n levels up.t.iN(tptdtntostpathtdirnametgetcwd(RRR((t'/data/zmath/zope/lib/python/ZEO/util.pyt parentdirst EnvironmentcBstZdZd„ZRS(s·Determine location of the Data.fs & ZEO_SERVER.pid files. Pass the argv[0] used to start ZEO to the constructor. Use the zeo_pid and fs attributes to get the filenames. cCstiidƒ}|djoKt|dƒ}tii tii |dƒƒo |}qjti ƒ}n||_ tii |dƒ|_tii |iƒp|i |_ntiidƒ}|djotii |idƒ}n||_tii |idƒ|_dS(Nt INSTANCE_HOMEitvartZEO_SERVER_PIDsZEO_SERVER.pidsData.fs(RtenvirontgettvtNoneR targv0RRtisdirtjoinRtselfthomeR tpidtzeo_pidtfs(RRRRR((Rt__init__$s "    (t__name__t __module__t__doc__R(((RR s (RRR R (R R R((Rt?s