Ooooops! OK I admit it - I'm too stupid to own a computer! I've found my own obvious mistake - I had left a " out of my html in the dtml testing method which is why the %22 got appended to the end of the URL - Doh! so my question is a lot clearer: running the python script on a Zcatalog - return context.Catalog() - works fine and correctly returns all the entries in the catalog, but the script - return context.Catalog({'x' : x, 'y' : y}) runs but doesn't return any results. I have quadruple checked my syntax (with the example) although I'm confused that I can't find the Catalog() method in the Zope API documentation. BTW the search keys and values definately do exist! I must be doing something wrong, but I don't know what Thanks in advance to anyone who can help, Sandy.