[Zope-Checkins] CVS: Zope/lib/python/Products/ZCatalog - Catalog.py:1.82 CatalogAwareness.py:1.15 CatalogPathAwareness.py:1.7 ZCatalog.py:1.103
Andreas Jung
andreas@digicool.com
Mon, 11 Mar 2002 11:13:26 -0500
Update of /cvs-repository/Zope/lib/python/Products/ZCatalog
In directory cvs.zope.org:/tmp/cvs-serv26208
Modified Files:
Catalog.py CatalogAwareness.py CatalogPathAwareness.py
ZCatalog.py
Log Message:
string module free zone
=== Zope/lib/python/Products/ZCatalog/Catalog.py 1.81 => 1.82 ===
from Products.PluginIndexes.TextIndex.Lexicon import Lexicon
from MultiMapping import MultiMapping
-from string import lower
import Record
from Missing import MV
from zLOG import LOG, ERROR
@@ -593,7 +592,7 @@
so=kw['sort_order']
else: so=None
if (type(so) is type('') and
- lower(so) in ('reverse', 'descending')):
+ so.lower() in ('reverse', 'descending')):
r.reverse()
r=map(lambda i: i[1], r)
=== Zope/lib/python/Products/ZCatalog/CatalogAwareness.py 1.14 => 1.15 ===
"""
-import urllib, string
+import urllib
from Globals import DTMLFile
class CatalogAware:
@@ -74,7 +74,7 @@
for user, roles in self.get_local_roles():
if 'Owner' in roles:
users.append(user)
- return string.join(users, ', ')
+ return ', '.join(users)
def onDeleteObject(self):
"""Object delete handler. I think this is obsoleted by
@@ -92,7 +92,7 @@
script_name=self.REQUEST['SCRIPT_NAME']
__traceback_info__=(`uri`, `script_name`)
if script_name:
- uri=filter(None, string.split(uri, script_name))[0]
+ uri=filter(None, uri.split(script_name))[0]
if not uri:
uri = '/'
if uri[0] != '/':
=== Zope/lib/python/Products/ZCatalog/CatalogPathAwareness.py 1.6 => 1.7 ===
"""ZCatalog Findable class"""
-import urllib, string
+import urllib
from Globals import DTMLFile
from Acquisition import aq_base
@@ -71,7 +71,7 @@
for user, roles in self.get_local_roles():
if 'Owner' in roles:
users.append(user)
- return string.join(users, ', ')
+ return ', '.join(users, ', ')
def onDeleteObject(self):
"""Object delete handler. I think this is obsoleted by
@@ -80,7 +80,7 @@
def getPath(self):
"""Return the physical path for an object."""
- return string.join(self.getPhysicalPath(), '/')
+ return '/'.join(self.getPhysicalPath())
def summary(self, num=200):
"""Return a summary of the text content of the object."""
=== Zope/lib/python/Products/ZCatalog/ZCatalog.py 1.102 => 1.103 ===
from Products.PluginIndexes.TextIndex.Vocabulary import Vocabulary
from Products.PluginIndexes.TextIndex import Splitter
-import string, urllib, os, sys, time, types
+import urllib, os, sys, time, types
@@ -211,7 +211,7 @@
def manage_edit(self, RESPONSE, URL1, threshold=1000, REQUEST=None):
""" edit the catalog """
if type(threshold) is not type(1):
- threshold=string.atoi(threshold)
+ threshold=int(threshold)
self.threshold = threshold
RESPONSE.redirect(URL1 + '/manage_main?manage_tabs_message=Catalog%20Changed')
@@ -312,7 +312,7 @@
words = 0
obj = REQUEST.PARENTS[1]
- path = string.join(obj.getPhysicalPath(), '/')
+ path = '/'.join(obj.getPhysicalPath())
results = self.ZopeFindAndApply(obj,