Commit a04d9ba7 authored by Tim Peters's avatar Tim Peters

Side-port changes checked in from a wrong project:

r28991 | jim | 2005-01-31 10:45:46 -0500 (Mon, 31 Jan 2005) | 5 lines
...
Renamed the Zope package to Zope2

Import of the Zope package is now deprecated, but will
be supported until Zope 2.11.
parent e44e5612
...@@ -69,12 +69,12 @@ It is instructive to watch what happens to the internal data structures ...@@ -69,12 +69,12 @@ It is instructive to watch what happens to the internal data structures
as changes are made. For example, in Zope, you can create an external as changes are made. For example, in Zope, you can create an external
method:: method::
import Zope import Zope2
def info(RESPONSE): def info(RESPONSE):
RESPONSE['Content-type']= 'text/plain' RESPONSE['Content-type']= 'text/plain'
return Zope.DB._storage._splat() return Zope2.DB._storage._splat()
and call it to monitor the storage. and call it to monitor the storage.
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# FOR A PARTICULAR PURPOSE # FOR A PARTICULAR PURPOSE
# #
############################################################################## ##############################################################################
"""ZODB undo support for Zope. """ZODB undo support for Zope2.
This package is used to support the Prefix object that Zope uses for This package is used to support the Prefix object that Zope uses for
undo. It is a separate package only to aid configuration management. undo. It is a separate package only to aid configuration management.
......
...@@ -197,10 +197,10 @@ def setup(lib_python): ...@@ -197,10 +197,10 @@ def setup(lib_python):
os.remove(os.path.join(lib_python, '..', '..', 'var', 'Data.fs')) os.remove(os.path.join(lib_python, '..', '..', 'var', 'Data.fs'))
except: except:
pass pass
import Zope import Zope2
import Products import Products
import AccessControl.SecurityManagement import AccessControl.SecurityManagement
app=Zope.app() app=Zope2.app()
Products.ZCatalog.ZCatalog.manage_addZCatalog(app, 'cat', '') Products.ZCatalog.ZCatalog.manage_addZCatalog(app, 'cat', '')
...@@ -279,16 +279,16 @@ def run1(tid, db, factory, job, args): ...@@ -279,16 +279,16 @@ def run1(tid, db, factory, job, args):
factory.__name__, r) factory.__name__, r)
def run(jobs, tid=''): def run(jobs, tid=''):
import Zope import Zope2
while 1: while 1:
factory, job, args, repeatp = jobs.next() factory, job, args, repeatp = jobs.next()
run1(tid, Zope.DB, factory, job, args) run1(tid, Zope2.DB, factory, job, args)
if repeatp: if repeatp:
while 1: while 1:
i = random.randint(0,100) i = random.randint(0,100)
if i > repeatp: if i > repeatp:
break break
run1(tid, Zope.DB, factory, job, args) run1(tid, Zope2.DB, factory, job, args)
def index(connection, messages, catalog): def index(connection, messages, catalog):
...@@ -733,8 +733,8 @@ def main(args=None): ...@@ -733,8 +733,8 @@ def main(args=None):
if options.has_key('setup'): if options.has_key('setup'):
setup(lib_python) setup(lib_python)
else: else:
import Zope import Zope2
Zope.startup() Zope2.startup()
#from ThreadedAsync.LoopCallback import loop #from ThreadedAsync.LoopCallback import loop
#threading.Thread(target=loop, args=(), name='asyncore').start() #threading.Thread(target=loop, args=(), name='asyncore').start()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment