[Zope] Zope Button

Casey Duncan casey@zope.com
Fri, 3 May 2002 09:37:39 -0400


As I think you have found (or not found ;^), there is none. Zope is an ob=
ject=20
publishing system. The cute little folders and file icons you see are jus=
t an=20
illusionary file-system-ish object hierarchy called OFS.

So back to your question, p_ is not a folder at all. It is an object=20
(technically its a class, but that is neither here nor there) which is an=
=20
attribute of (IOW its attached to) the root folder, which is a folder (bu=
t a=20
special one). The p_ attribute is defined in the Zope code as a container=
 for=20
Zope software to put things in that are built into the system.=20

In technobabble terms, it is a special global "namespace" for the Zope=20
software itself to store resources it uses. This namespace is separated=20
(under the name p_) from the rest of the OFS so that you can define your =
own=20
objects with just about any name, including "ZopeButton", without obscuri=
ng=20
the ones in p_.

So where does it come from? ZopeButton comes from a file in your Zope=20
installation. The Zope software wraps this file in a special ImageFile ob=
ject=20
(which knows how to load image files as object) and then "mounts" it in p=
_.=20
There are all kinds of other images in there as well, mostly all for use =
by=20
the ZMI: icons, decorations, other powered by icons, etc. If you don't=20
believe me, check out $Zope/lib/python/OFS/misc_.py

-Casey

On Thursday 02 May 2002 03:24 pm, Bill Kerr allegedly wrote:
> why can't I find the folder in which the Zope Button (that displays in =
the
> standard_html_footer) resides on my computer -- I can see the button bu=
t
> can't find it
> right click > View Source
>=20
> <img src=3D"http://localhost:8080/p_/ZopeButton" etc.
> where is this p_ folder?
>=20
> -- Bill