Re: [Zope-dev] more on keyword indexes

2000-12-16 Thread Steve Alexander

Josh Zeidner wrote:

> 
> As for the ( MediaKeywords in ['ouch'] ) this is featured on a Zope 
> article about keyword indexes and it should be updated.

You're right. The HOWTO at

   http://www.zope.org/Members/AlexR/KeywordIndexes

has "in" instead of "=" in the last example. So,



should read:



I've cc-ed Alex, the author of the HOWTO, into this message.


>  OK.  Is it possible to query keyword indexes for several keywords at 
> once?  If so, what is the syntax?

What exactly do you mean? You can do a search for 'Squids' or 'foo' or 
'bar' in a particular keyword index using the syntax given above.

> Again, I am reporting a bug I have 
> found that even if I am querying for only one( using the aformentioned 
> syntax ), the results are unpredictable.  

I explained in a previous message that I had tried to do what you 
described, and I could not reproduce your bug. Everything came out 
consistently, as I would expect.

> I am using CatalogAware 
> ZClasses and I am quite sure that the words are indexed( by reporting 
> the featured MetaData ).

Ok. Describe exactly the steps I need to take, from an empty zope, to 
reproduce your bug. I'll try this out and either tell you what you've 
done wrong, or give you a patch to ZCatalog, depending where the fault 
lies. Don't forget to say exactly what version of Zope and what version 
of Python you're using.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] more on keyword indexes

2000-12-16 Thread Josh Zeidner


Thanks for the reply.

As for the ( MediaKeywords in ['ouch'] ) this is featured on a Zope article 
about keyword indexes and it should be updated.

>Josh Zeidner writes:
>  > 
>  >   This seems like the obvious result: BUT: it depends if you want a 
>AND/OR
>  > type search.
>ZCatalog combines several search terms for a single index with
>"OR" and search expressions for different indexes with
>an "AND".

  OK.  Is it possible to query keyword indexes for several keywords at once? 
  If so, what is the syntax?  Again, I am reporting a bug I have found that 
even if I am querying for only one( using the aformentioned syntax ), the 
results are unpredictable.  I am using CatalogAware ZClasses and I am quite 
sure that the words are indexed( by reporting the featured MetaData ).

-josh zeidner

_
Get your FREE download of MSN Explorer at http://explorer.msn.com


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Problem in current CVS

2000-12-16 Thread Jimmie Houchin

Hello,

I just updated my current CVS build of Zope2.

I do ./start and get a traceback.
The last lines of which are:
File "/usr/local/zope/Zope2/ZServer/HTTPResponse.py", line 95, in ?
   from ZPublisher.HTTPResponse import HTTPResponse,
end_of_header_search
ImportError: cannont import name end_of_header_search

I go to the line in HTTPResponse and end_of_header_search is commented
out.

Is there a reason? Looks like it may have been part of Evan's
content-length bugfix?

Thanks,

Jimmie Houchin

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] urllib not available in Python Scripts?

2000-12-16 Thread Ken Manheimer

On Sat, 16 Dec 2000, Evan Simpson wrote:

> From: "Itai Tavor" <[EMAIL PROTECTED]>
> [...]
> Sure.  Since you've already got a MoreBuiltins module, that's probably a
> fine place to put this.  In MoreBuiltins/__init__.py (or a brand new Product
> directory of your choice) put the following lines:
> 
>   import urllib
>   urllib.__allow_access_to_unprotected_subobjects__ = 1
> 
> ...and similarly if you want to declare other modules PS-importable.  As of
> 2.3, the proper way to do this will be:
> 
>   from AccessControl import ModuleSecurityInfo
>   ModuleSecurityInfo('urllib').setDefaultAccess(1)

I wonder whether that ought to be something like:

  from AccessControl import ModuleSecurityInfo, ENABLE_ACCESS
  ModuleSecurityInfo('urllib').setDefaultAccess(ENABLE_ACCESS)

?

The benefit of having an explicit name for "enable" is marginal, but would
become significant if there were other access modes besides ENABLE and
DISABLE - eg, "ENABLE_METHODS", "ENABLE_ATTRIBUTES", etc...

Ken Manheimer
[EMAIL PROTECTED]


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] urllib not available in Python Scripts?

2000-12-16 Thread Evan Simpson

From: "Itai Tavor" <[EMAIL PROTECTED]>
> The reason I could do urllib.quote in Python Methods was that I
> implemented the MoreBuiltins trick someone described here a while
> ago.

That would be me :-)

> Is there anything that can be done so that adding modules continues
> to work?

Sure.  Since you've already got a MoreBuiltins module, that's probably a
fine place to put this.  In MoreBuiltins/__init__.py (or a brand new Product
directory of your choice) put the following lines:

  import urllib
  urllib.__allow_access_to_unprotected_subobjects__ = 1

...and similarly if you want to declare other modules PS-importable.  As of
2.3, the proper way to do this will be:

  from AccessControl import ModuleSecurityInfo
  ModuleSecurityInfo('urllib').setDefaultAccess(1)

Cheers,

Evan @ digicool & 4-am


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )