[Zope] How can I know all the functions that are called by Zope?

Dieter Maurer dieter@handshake.de
Fri, 20 Jun 2003 20:42:39 +0200

Igor Leturia wrote at 2003-6-19 16:49 +0200:
 >   I am trying to make a new Zope product, based on LocalFS, so I am
 > trying to change the source code of LocalFS. But in my product, I need
 > to know who is the authenticated user when someone tries to read a file
 > in the local filesystem by writing its URL. The problem is that if I ask
 > UserManager in any function in the source of LocalFS, it always tells me
 > that it is no one. I think I read somewhere, sometime, that the
 > authenticated user can't be read until the end of traversal. So the
 > changes that I have to make in the source code, have to be made
 > somewhere where the traversal has already finished.

Apparently, there is a "validation_hook". Look at "Zope/__init__.py".

You find the traversal code in "ZPublisher.BaseRequest.BaseRequest.traverse".

 > ...
 >     - Does anybody know all the functions that are called in the Zope
 > sources when someone writes the URL of a file in the local filesystem?

You can use a profiler (e.g. "ZopeProfiler"


). However, you will get an incredibly long list.

 >     - Or else, how can I know all the functions that are called, without
 > having to put traces in all the functions in all the Zope source?

A profiler...