[Fwd: Re: INSTANCE_HOME, SOFTWARE_HOME and package_home]
-------- Original Message -------- From: "Evan Simpson" <evan@4-am.com> Subject: Re: INSTANCE_HOME, SOFTWARE_HOME and package_home To: "Chris Withers" <chrisw@nipltd.com> From: Chris Withers <chrisw@nipltd.com>
E:\Zope\2.2.0\lib\python/Products/Squishdot/validArticle.dtml
'E:\\Zope\\2.2.0/Products/Squishdot/validArticle.dtml'
Okay, I can understand (but not approve of) having a mixture of \ and / in a string (I guess python's open takes care of that) but what's with the \\ in the INSTANCE_HOME case?!
Well, the first line above doesn't have quotes, so I assume you used "print". The second line does, so I assume you just evaluated it, in which case it takes the repr of the string and therefore quotes the backslashes by doubling them.
Can you explain why that makes sense please ;-) Surely it'd be more useful to default to SOFTWARE_HOME including '/lib/python' so that old code wasn't broken?
Well, old code presumably wouldn't use INSTANCE_HOME, so it wouldn't arise. I don't know why that default was chosen.
And that'll work in INSTANCE_HOME (in either the base or instance parts) Zope installs as well as non-instance home ones?
It will work regardless of where the Product lives. "product_home" is a non-Zope-specific function which extracts the path of a module in a package from that module's global dictionary. Cheers, Evan @ digicool & 4-am
participants (1)
-
Chris Withers