Commit e8d22173 authored by Jim Fulton's avatar Jim Fulton

Detabification and new copyright.

parent ce259741
/*********************************************************** /*****************************************************************************
Copyright
Zope Public License (ZPL) Version 0.9.4
Copyright 1997 Digital Creations, L.L.C., 910 Princess Anne ---------------------------------------
Street, Suite 300, Fredericksburg, Virginia 22401 U.S.A. All
rights reserved. Copyright (c) Digital Creations. All rights reserved.
******************************************************************/ Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:
1. Redistributions in source code must retain the above
copyright notice, this list of conditions, and the following
disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions, and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
3. Any use, including use of the Zope software to operate a
website, must either comply with the terms described below
under "Attribution" or alternatively secure a separate
license from Digital Creations.
4. All advertising materials, documentation, or technical papers
mentioning features derived from or use of this software must
display the following acknowledgement:
"This product includes software developed by Digital
Creations for use in the Z Object Publishing Environment
(http://www.zope.org/)."
5. Names associated with Zope or Digital Creations must not be
used to endorse or promote products derived from this
software without prior written permission from Digital
Creations.
6. Redistributions of any form whatsoever must retain the
following acknowledgment:
"This product includes software developed by Digital
Creations for use in the Z Object Publishing Environment
(http://www.zope.org/)."
7. Modifications are encouraged but must be packaged separately
as patches to official Zope releases. Distributions that do
not clearly separate the patches from the original work must
be clearly labeled as unofficial distributions.
Disclaimer
THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
Attribution
Individuals or organizations using this software as a web site
must provide attribution by placing the accompanying "button"
and a link to the accompanying "credits page" on the website's
main entry point. In cases where this placement of
attribution is not feasible, a separate arrangment must be
concluded with Digital Creations. Those using the software
for purposes other than web sites must provide a corresponding
attribution in locations that include a copyright using a
manner best suited to the application environment.
This software consists of contributions made by Digital
Creations and many individuals on behalf of Digital Creations.
Specific attributions are listed in the accompanying credits
file.
****************************************************************************/
static char Record_module_documentation[] = static char Record_module_documentation[] =
"" ""
"\n$Id: Record.c,v 1.4 1998/07/27 13:09:58 jim Exp $" "\n$Id: Record.c,v 1.5 1998/12/04 20:15:24 jim Exp $"
; ;
#ifdef PERSISTENCE #ifdef PERSISTENCE
...@@ -512,7 +586,7 @@ void ...@@ -512,7 +586,7 @@ void
initRecord() initRecord()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.4 $"; char *rev="$Revision: 1.5 $";
UNLESS(py___record_schema__=PyString_FromString("__record_schema__")) return; UNLESS(py___record_schema__=PyString_FromString("__record_schema__")) return;
...@@ -551,6 +625,9 @@ initRecord() ...@@ -551,6 +625,9 @@ initRecord()
Revision Log: Revision Log:
$Log: Record.c,v $ $Log: Record.c,v $
Revision 1.5 1998/12/04 20:15:24 jim
Detabification and new copyright.
Revision 1.4 1998/07/27 13:09:58 jim Revision 1.4 1998/07/27 13:09:58 jim
Changed _p___reinit__ to _p_deactivate. Changed _p___reinit__ to _p_deactivate.
......
/*********************************************************** /*****************************************************************************
Copyright
Zope Public License (ZPL) Version 0.9.4
Copyright 1997 Digital Creations, L.L.C., 910 Princess Anne ---------------------------------------
Street, Suite 300, Fredericksburg, Virginia 22401 U.S.A. All
rights reserved. Copyright (c) Digital Creations. All rights reserved.
******************************************************************/ Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:
1. Redistributions in source code must retain the above
copyright notice, this list of conditions, and the following
disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions, and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
3. Any use, including use of the Zope software to operate a
website, must either comply with the terms described below
under "Attribution" or alternatively secure a separate
license from Digital Creations.
4. All advertising materials, documentation, or technical papers
mentioning features derived from or use of this software must
display the following acknowledgement:
"This product includes software developed by Digital
Creations for use in the Z Object Publishing Environment
(http://www.zope.org/)."
5. Names associated with Zope or Digital Creations must not be
used to endorse or promote products derived from this
software without prior written permission from Digital
Creations.
6. Redistributions of any form whatsoever must retain the
following acknowledgment:
"This product includes software developed by Digital
Creations for use in the Z Object Publishing Environment
(http://www.zope.org/)."
7. Modifications are encouraged but must be packaged separately
as patches to official Zope releases. Distributions that do
not clearly separate the patches from the original work must
be clearly labeled as unofficial distributions.
Disclaimer
THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
Attribution
Individuals or organizations using this software as a web site
must provide attribution by placing the accompanying "button"
and a link to the accompanying "credits page" on the website's
main entry point. In cases where this placement of
attribution is not feasible, a separate arrangment must be
concluded with Digital Creations. Those using the software
for purposes other than web sites must provide a corresponding
attribution in locations that include a copyright using a
manner best suited to the application environment.
This software consists of contributions made by Digital
Creations and many individuals on behalf of Digital Creations.
Specific attributions are listed in the accompanying credits
file.
****************************************************************************/
static char Record_module_documentation[] = static char Record_module_documentation[] =
"" ""
"\n$Id: Record.c,v 1.4 1998/07/27 13:09:58 jim Exp $" "\n$Id: Record.c,v 1.5 1998/12/04 20:15:24 jim Exp $"
; ;
#ifdef PERSISTENCE #ifdef PERSISTENCE
...@@ -512,7 +586,7 @@ void ...@@ -512,7 +586,7 @@ void
initRecord() initRecord()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.4 $"; char *rev="$Revision: 1.5 $";
UNLESS(py___record_schema__=PyString_FromString("__record_schema__")) return; UNLESS(py___record_schema__=PyString_FromString("__record_schema__")) return;
...@@ -551,6 +625,9 @@ initRecord() ...@@ -551,6 +625,9 @@ initRecord()
Revision Log: Revision Log:
$Log: Record.c,v $ $Log: Record.c,v $
Revision 1.5 1998/12/04 20:15:24 jim
Detabification and new copyright.
Revision 1.4 1998/07/27 13:09:58 jim Revision 1.4 1998/07/27 13:09:58 jim
Changed _p___reinit__ to _p_deactivate. Changed _p___reinit__ to _p_deactivate.
......
#!/bin/env python ##############################################################################
##############################################################################
# #
# Copyright # Zope Public License (ZPL) Version 0.9.4
# # ---------------------------------------
# Copyright 1998 Digital Creations, Inc., 910 Princess Anne #
# Street, Suite 300, Fredericksburg, Virginia 22401 U.S.A. All # Copyright (c) Digital Creations. All rights reserved.
# rights reserved. #
# # Redistribution and use in source and binary forms, with or
############################################################################## # without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions in source code must retain the above
# copyright notice, this list of conditions, and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Any use, including use of the Zope software to operate a
# website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
#
# 4. All advertising materials, documentation, or technical papers
# mentioning features derived from or use of this software must
# display the following acknowledgement:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 5. Names associated with Zope or Digital Creations must not be
# used to endorse or promote products derived from this
# software without prior written permission from Digital
# Creations.
#
# 6. Redistributions of any form whatsoever must retain the
# following acknowledgment:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
#
##############################################################################
__doc__='''short description __doc__='''short description
$Id: Permission.py,v 1.2 1998/05/11 14:58:28 jim Exp $''' $Id: Permission.py,v 1.3 1998/12/04 20:15:25 jim Exp $'''
__version__='$Revision: 1.2 $'[11:-2] __version__='$Revision: 1.3 $'[11:-2]
from Globals import HTMLFile, MessageDialog from Globals import HTMLFile, MessageDialog
from string import join, strip, split, find from string import join, strip, split, find
...@@ -23,7 +97,7 @@ ListType=type([]) ...@@ -23,7 +97,7 @@ ListType=type([])
name_trans=filter(lambda c, an=string.letters+string.digits+'_': c not in an, name_trans=filter(lambda c, an=string.letters+string.digits+'_': c not in an,
map(chr,range(256))) map(chr,range(256)))
name_trans=string.maketrans(string.join(name_trans,''), '_'*len(name_trans)) name_trans=string.maketrans(string.join(name_trans,''), '_'*len(name_trans))
...@@ -34,93 +108,81 @@ class Permission: ...@@ -34,93 +108,81 @@ class Permission:
# by the object. # by the object.
def __init__(self,name,data,obj): def __init__(self,name,data,obj):
self.name=name self.name=name
self._p='_'+string.translate(name,name_trans)+"_Permission" self._p='_'+string.translate(name,name_trans)+"_Permission"
self.data=data self.data=data
if hasattr(obj, 'aq_base'): obj=obj.aq_base if hasattr(obj, 'aq_base'): obj=obj.aq_base
self.obj=obj self.obj=obj
def getRoles(self): def getRoles(self):
# Return the list of role names which have been given # Return the list of role names which have been given
# this permission for the object in question. To do # this permission for the object in question. To do
# this, we try to get __roles__ from all of the object # this, we try to get __roles__ from all of the object
# attributes that this permission represents. # attributes that this permission represents.
obj=self.obj obj=self.obj
name=self._p name=self._p
if hasattr(obj, name): return getattr(obj, name) if hasattr(obj, name): return getattr(obj, name)
roles=[] roles=[]
for name in self.data: for name in self.data:
if name: if name:
if hasattr(obj, name): if hasattr(obj, name):
attr=getattr(obj, name) attr=getattr(obj, name)
if hasattr(attr,'im_self'): if hasattr(attr,'im_self'):
attr=attr.im_self attr=attr.im_self
if hasattr(attr, '__dict__'): if hasattr(attr, '__dict__'):
attr=attr.__dict__ attr=attr.__dict__
name=name+'__roles__' name=name+'__roles__'
if attr.has_key(name): if attr.has_key(name):
roles=attr[name] roles=attr[name]
break break
elif hasattr(obj, '__dict__'): elif hasattr(obj, '__dict__'):
attr=obj.__dict__ attr=obj.__dict__
if attr.has_key('__roles__'): if attr.has_key('__roles__'):
roles=attr['__roles__'] roles=attr['__roles__']
break break
if roles: if roles:
try: try:
if 'Shared' not in roles: return tuple(roles) if 'Shared' not in roles: return tuple(roles)
roles=list(roles) roles=list(roles)
roles.remove('Shared') roles.remove('Shared')
return roles return roles
except: return [] except: return []
if roles is None: return ['Manager','Anonymous'] if roles is None: return ['Manager','Anonymous']
return roles return roles
def setRoles(self, roles): def setRoles(self, roles):
obj=self.obj obj=self.obj
if type(roles) is ListType and not roles: if type(roles) is ListType and not roles:
if hasattr(obj, self._p): delattr(obj, self._p) if hasattr(obj, self._p): delattr(obj, self._p)
else: else:
setattr(obj, self._p, roles) setattr(obj, self._p, roles)
for name in self.data: for name in self.data:
if name=='': attr=obj if name=='': attr=obj
else: attr=getattr(obj, name) else: attr=getattr(obj, name)
try: del attr.__roles__ try: del attr.__roles__
except: pass except: pass
try: delattr(obj,name+'__roles__') try: delattr(obj,name+'__roles__')
except: pass except: pass
def setRole(self, role, present): def setRole(self, role, present):
roles=self.getRoles() roles=self.getRoles()
if role in roles: if role in roles:
if present: return if present: return
if type(roles) is ListType: roles.remove(role) if type(roles) is ListType: roles.remove(role)
else: else:
roles=list(roles) roles=list(roles)
roles.remove(role) roles.remove(role)
roles=tuple(roles) roles=tuple(roles)
elif not present: return elif not present: return
else: else:
if type(roles) is ListType: roles.append(role) if type(roles) is ListType: roles.append(role)
else: roles=roles+(role,) else: roles=roles+(role,)
self.setRoles(roles) self.setRoles(roles)
def __len__(self): return 1 def __len__(self): return 1
def __str__(self): return self.name def __str__(self): return self.name
##############################################################################
#
# $Log: Permission.py,v $
# Revision 1.2 1998/05/11 14:58:28 jim
# Added some machinery to fix bugs in reseting old permission settings.
#
# Revision 1.1 1998/05/08 14:45:20 jim
# new permission machinery
#
#
#!/bin/env python ##############################################################################
##############################################################################
#
# Copyright
#
# Copyright 1998 Digital Creations, Inc., 910 Princess Anne
# Street, Suite 300, Fredericksburg, Virginia 22401 U.S.A. All
# rights reserved.
# #
############################################################################## # Zope Public License (ZPL) Version 0.9.4
# ---------------------------------------
#
# Copyright (c) Digital Creations. All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions in source code must retain the above
# copyright notice, this list of conditions, and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Any use, including use of the Zope software to operate a
# website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
#
# 4. All advertising materials, documentation, or technical papers
# mentioning features derived from or use of this software must
# display the following acknowledgement:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 5. Names associated with Zope or Digital Creations must not be
# used to endorse or promote products derived from this
# software without prior written permission from Digital
# Creations.
#
# 6. Redistributions of any form whatsoever must retain the
# following acknowledgment:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
#
##############################################################################
__doc__='''Objects that implement Permission-based roles. __doc__='''Objects that implement Permission-based roles.
$Id: PermissionRole.py,v 1.1 1998/05/08 14:45:20 jim Exp $''' $Id: PermissionRole.py,v 1.2 1998/12/04 20:15:25 jim Exp $'''
__version__='$Revision: 1.1 $'[11:-2] __version__='$Revision: 1.2 $'[11:-2]
import sys import sys
...@@ -21,7 +95,7 @@ from ExtensionClass import Base ...@@ -21,7 +95,7 @@ from ExtensionClass import Base
import string import string
name_trans=filter(lambda c, an=string.letters+string.digits+'_': c not in an, name_trans=filter(lambda c, an=string.letters+string.digits+'_': c not in an,
map(chr,range(256))) map(chr,range(256)))
name_trans=string.maketrans(string.join(name_trans,''), '_'*len(name_trans)) name_trans=string.maketrans(string.join(name_trans,''), '_'*len(name_trans))
class PermissionRole(Base): class PermissionRole(Base):
...@@ -35,43 +109,43 @@ class PermissionRole(Base): ...@@ -35,43 +109,43 @@ class PermissionRole(Base):
""" """
def __init__(self, name, default=('Manager',)): def __init__(self, name, default=('Manager',)):
self.__name__=name self.__name__=name
self._p='_'+string.translate(name,name_trans)+"_Permission" self._p='_'+string.translate(name,name_trans)+"_Permission"
self._d=default self._d=default
def __of__(self, parent): def __of__(self, parent):
r=imPermissionRole() r=imPermissionRole()
n=r._p=self._p n=r._p=self._p
if hasattr(parent, n): r._d=getattr(parent,n) if hasattr(parent, n): r._d=getattr(parent,n)
else: r._d=self._d else: r._d=self._d
return r return r
class imPermissionRole(Base): class imPermissionRole(Base):
"""Implement permission-based roles """Implement permission-based roles
""" """
def __of__(self, parent): def __of__(self, parent):
obj=parent obj=parent
n=self._p n=self._p
r=None r=None
while 1: while 1:
if hasattr(obj,n): if hasattr(obj,n):
roles=getattr(obj, n) roles=getattr(obj, n)
if roles is None: return 'Anonymous', if roles is None: return 'Anonymous',
if type(roles) is type(()): if type(roles) is type(()):
if r is None: return roles if r is None: return roles
return r+list(roles) return r+list(roles)
if r is None: r=list(roles) if r is None: r=list(roles)
else: r=r+list(roles) else: r=r+list(roles)
if hasattr(obj,'aq_parent'): if hasattr(obj,'aq_parent'):
obj=obj.aq_parent obj=obj.aq_parent
else: else:
break break
if r is None: r=self._d if r is None: r=self._d
return r return r
# The following methods are needed in the unlikely case that an unwrapped # The following methods are needed in the unlikely case that an unwrapped
# object is accessed: # object is accessed:
def __getitem__(self, i): return self._d[i] def __getitem__(self, i): return self._d[i]
...@@ -90,12 +164,12 @@ def main(): ...@@ -90,12 +164,12 @@ def main():
from Acquisition import Implicit from Acquisition import Implicit
class I(Implicit): class I(Implicit):
x__roles__=PermissionRole('x') x__roles__=PermissionRole('x')
y__roles__=PermissionRole('y') y__roles__=PermissionRole('y')
z__roles__=PermissionRole('z') z__roles__=PermissionRole('z')
def x(self): pass def x(self): pass
def y(self): pass def y(self): pass
def z(self): pass def z(self): pass
...@@ -132,13 +206,3 @@ def main(): ...@@ -132,13 +206,3 @@ def main():
print a.b.q.z.__roles__ print a.b.q.z.__roles__
print a.b.c.q.z.__roles__ print a.b.c.q.z.__roles__
print print
if __name__ == "__main__": main()
##############################################################################
#
# $Log: PermissionRole.py,v $
# Revision 1.1 1998/05/08 14:45:20 jim
# new permission machinery
#
#
This diff is collapsed.
This diff is collapsed.
##############################################################################
#
# Zope Public License (ZPL) Version 0.9.4
# ---------------------------------------
#
# Copyright (c) Digital Creations. All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions in source code must retain the above
# copyright notice, this list of conditions, and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Any use, including use of the Zope software to operate a
# website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
#
# 4. All advertising materials, documentation, or technical papers
# mentioning features derived from or use of this software must
# display the following acknowledgement:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 5. Names associated with Zope or Digital Creations must not be
# used to endorse or promote products derived from this
# software without prior written permission from Digital
# Creations.
#
# 6. Redistributions of any form whatsoever must retain the
# following acknowledgment:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
#
##############################################################################
##############################################################################
#
# Zope Public License (ZPL) Version 0.9.4
# ---------------------------------------
#
# Copyright (c) Digital Creations. All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions in source code must retain the above
# copyright notice, this list of conditions, and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Any use, including use of the Zope software to operate a
# website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
#
# 4. All advertising materials, documentation, or technical papers
# mentioning features derived from or use of this software must
# display the following acknowledgement:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 5. Names associated with Zope or Digital Creations must not be
# used to endorse or promote products derived from this
# software without prior written permission from Digital
# Creations.
#
# 6. Redistributions of any form whatsoever must retain the
# following acknowledgment:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
#
##############################################################################
__doc__="""System management components""" __doc__="""System management components"""
__version__='$Revision: 1.36 $'[11:-2] __version__='$Revision: 1.37 $'[11:-2]
import sys,os,time,string,Globals, Acquisition import sys,os,time,string,Globals, Acquisition
...@@ -90,53 +174,53 @@ class ApplicationManager(Folder,CacheManager): ...@@ -90,53 +174,53 @@ class ApplicationManager(Folder,CacheManager):
return 0 return 0
def _init(self): def _init(self):
pass pass
def manage_app(self, URL2): def manage_app(self, URL2):
"""Return to the main management screen""" """Return to the main management screen"""
raise 'Redirect', URL2+'/manage' raise 'Redirect', URL2+'/manage'
def parentObject(self): def parentObject(self):
try: return (self.aq_parent,) try: return (self.aq_parent,)
except: return () except: return ()
def process_time(self): def process_time(self):
s=int(time.time())-self.process_start s=int(time.time())-self.process_start
d=int(s/86400) d=int(s/86400)
s=s-(d*86400) s=s-(d*86400)
h=int(s/3600) h=int(s/3600)
s=s-(h*3600) s=s-(h*3600)
m=int(s/60) m=int(s/60)
s=s-(m*60) s=s-(m*60)
d=d and ('%d day%s' % (d, (d != 1 and 's' or ''))) or '' d=d and ('%d day%s' % (d, (d != 1 and 's' or ''))) or ''
h=h and ('%d hour%s' % (h, (h != 1 and 's' or ''))) or '' h=h and ('%d hour%s' % (h, (h != 1 and 's' or ''))) or ''
m=m and ('%d min' % m) or '' m=m and ('%d min' % m) or ''
s='%d sec' % s s='%d sec' % s
return '%s %s %s %s' % (d, h, m, s) return '%s %s %s %s' % (d, h, m, s)
def db_name(self): return Globals.Bobobase._jar.db.file_name def db_name(self): return Globals.Bobobase._jar.db.file_name
def db_size(self): def db_size(self):
s=os.stat(self.db_name())[6] s=os.stat(self.db_name())[6]
if s >= 1048576.0: return '%.1fM' % (s/1048576.0) if s >= 1048576.0: return '%.1fM' % (s/1048576.0)
return '%.1fK' % (s/1024.0) return '%.1fK' % (s/1024.0)
def manage_shutdown(self): def manage_shutdown(self):
"""Shut down the application""" """Shut down the application"""
db=Globals.Bobobase._jar.db db=Globals.Bobobase._jar.db
db.save_index() db.save_index()
db.file.close() db.file.close()
db=Globals.SessionBase.TDB db=Globals.SessionBase.TDB
db.save_index() db.save_index()
db.file.close() db.file.close()
sys.exit(0) sys.exit(0)
def manage_pack(self, days=0, REQUEST=None): def manage_pack(self, days=0, REQUEST=None):
"""Pack the database""" """Pack the database"""
if self._p_jar.db is not Globals.Bobobase._jar.db: if self._p_jar.db is not Globals.Bobobase._jar.db:
raise 'Session Error', ( raise 'Session Error', (
'''You may not pack the application database while '''You may not pack the application database while
working in a <em>session</em>''') working in a <em>session</em>''')
t=time.time()-days*86400 t=time.time()-days*86400
if Globals.Bobobase.has_key('_pack_time'): if Globals.Bobobase.has_key('_pack_time'):
since=Globals.Bobobase['_pack_time'] since=Globals.Bobobase['_pack_time']
...@@ -147,32 +231,32 @@ class ApplicationManager(Folder,CacheManager): ...@@ -147,32 +231,32 @@ class ApplicationManager(Folder,CacheManager):
Globals.Bobobase['_pack_time']=t Globals.Bobobase['_pack_time']=t
get_transaction().note('') get_transaction().note('')
get_transaction().commit() get_transaction().commit()
Globals.Bobobase._jar.db.pack(t,0) Globals.Bobobase._jar.db.pack(t,0)
if REQUEST: return self.manage_main(self, REQUEST) if REQUEST: return self.manage_main(self, REQUEST)
def revert_points(self): return () def revert_points(self): return ()
def version_list(self): def version_list(self):
# Return a list of currently installed products/versions # Return a list of currently installed products/versions
path_join=os.path.join path_join=os.path.join
isdir=os.path.isdir isdir=os.path.isdir
exists=os.path.exists exists=os.path.exists
strip=string.strip strip=string.strip
product_dir=path_join(SOFTWARE_HOME,'Products') product_dir=path_join(SOFTWARE_HOME,'Products')
product_names=os.listdir(product_dir) product_names=os.listdir(product_dir)
product_names.sort() product_names.sort()
info=[] info=[]
for product_name in product_names: for product_name in product_names:
package_dir=path_join(product_dir, product_name) package_dir=path_join(product_dir, product_name)
if not isdir(package_dir): if not isdir(package_dir):
continue continue
version_txt=path_join(package_dir, 'version.txt') version_txt=path_join(package_dir, 'version.txt')
if not exists(version_txt): if not exists(version_txt):
continue continue
file=open(version_txt, 'r') file=open(version_txt, 'r')
data=file.readline() data=file.readline()
file.close() file.close()
info.append(strip(data)) info.append(strip(data))
return info return info
This diff is collapsed.
##############################################################################
#
# Zope Public License (ZPL) Version 0.9.4
# ---------------------------------------
#
# Copyright (c) Digital Creations. All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions in source code must retain the above
# copyright notice, this list of conditions, and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Any use, including use of the Zope software to operate a
# website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
#
# 4. All advertising materials, documentation, or technical papers
# mentioning features derived from or use of this software must
# display the following acknowledgement:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 5. Names associated with Zope or Digital Creations must not be
# used to endorse or promote products derived from this
# software without prior written permission from Digital
# Creations.
#
# 6. Redistributions of any form whatsoever must retain the
# following acknowledgment:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
#
##############################################################################
"""Common HTML dialog boxes """Common HTML dialog boxes
...@@ -14,12 +98,12 @@ ...@@ -14,12 +98,12 @@
example usage: example usage:
<PRE> <PRE>
return MessageDialog(title='Just thought you should know...', return MessageDialog(title='Just thought you should know...',
message='You have wiped out your data.', message='You have wiped out your data.',
action='/paid_tech_support/prices.html', action='/paid_tech_support/prices.html',
target='_top') target='_top')
</PRE>""" </PRE>"""
__version__='$Revision: 1.3 $'[11:-2] __version__='$Revision: 1.4 $'[11:-2]
from Globals import HTML from Globals import HTML
......
#!/bin/env python ##############################################################################
##############################################################################
# #
# Copyright # Zope Public License (ZPL) Version 0.9.4
# # ---------------------------------------
# Copyright 1998 Digital Creations, Inc., 910 Princess Anne #
# Street, Suite 300, Fredericksburg, Virginia 22401 U.S.A. All # Copyright (c) Digital Creations. All rights reserved.
# rights reserved. #
# # Redistribution and use in source and binary forms, with or
############################################################################## # without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions in source code must retain the above
# copyright notice, this list of conditions, and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Any use, including use of the Zope software to operate a
# website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
#
# 4. All advertising materials, documentation, or technical papers
# mentioning features derived from or use of this software must
# display the following acknowledgement:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 5. Names associated with Zope or Digital Creations must not be
# used to endorse or promote products derived from this
# software without prior written permission from Digital
# Creations.
#
# 6. Redistributions of any form whatsoever must retain the
# following acknowledgment:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
#
##############################################################################
__doc__='''Standard routines for handling Principia Extensions __doc__='''Standard routines for handling Principia Extensions
Principia extensions currently include external methods and pluggable brains. Principia extensions currently include external methods and pluggable brains.
$Id: Extensions.py,v 1.3 1998/12/03 15:29:20 jim Exp $''' $Id: Extensions.py,v 1.4 1998/12/04 20:15:25 jim Exp $'''
__version__='$Revision: 1.3 $'[11:-2] __version__='$Revision: 1.4 $'[11:-2]
from string import find from string import find
import os, zlib, rotor import os, zlib, rotor
...@@ -23,12 +97,12 @@ exists=os.path.exists ...@@ -23,12 +97,12 @@ exists=os.path.exists
class FuncCode: class FuncCode:
def __init__(self, f, im=0): def __init__(self, f, im=0):
self.co_varnames=f.func_code.co_varnames[im:] self.co_varnames=f.func_code.co_varnames[im:]
self.co_argcount=f.func_code.co_argcount-im self.co_argcount=f.func_code.co_argcount-im
def __cmp__(self,other): def __cmp__(self,other):
return cmp((self.co_argcount, self.co_varnames), return cmp((self.co_argcount, self.co_varnames),
(other.co_argcount, other.co_varnames)) (other.co_argcount, other.co_varnames))
def getObject(module, name, reload=0, modules={}): def getObject(module, name, reload=0, modules={}):
...@@ -90,21 +164,6 @@ def getBrain(module, class_name, reload=0): ...@@ -90,21 +164,6 @@ def getBrain(module, class_name, reload=0):
'The class, %s, is not defined in file, %s' % (class_name, module)) 'The class, %s, is not defined in file, %s' % (class_name, module))
if not hasattr(c,'__bases__'): raise ValueError, ( if not hasattr(c,'__bases__'): raise ValueError, (
'%s, is not a class' % class_name) '%s, is not a class' % class_name)
return c return c
##############################################################################
#
# $Log: Extensions.py,v $
# Revision 1.3 1998/12/03 15:29:20 jim
# rearranged SOFTWARE_HOME and INSTANCE_HOME
#
# Revision 1.2 1998/09/16 16:52:42 jim
# Improved error reporting.
#
# Revision 1.1 1998/08/03 13:43:26 jim
# new folderish control panel and product management
#
#
#!/bin/env python ##############################################################################
##############################################################################
# #
# Copyright # Zope Public License (ZPL) Version 0.9.4
# # ---------------------------------------
# Copyright 1998 Digital Creations, Inc., 910 Princess Anne #
# Street, Suite 300, Fredericksburg, Virginia 22401 U.S.A. All # Copyright (c) Digital Creations. All rights reserved.
# rights reserved. #
# # Redistribution and use in source and binary forms, with or
############################################################################## # without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions in source code must retain the above
# copyright notice, this list of conditions, and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Any use, including use of the Zope software to operate a
# website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
#
# 4. All advertising materials, documentation, or technical papers
# mentioning features derived from or use of this software must
# display the following acknowledgement:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 5. Names associated with Zope or Digital Creations must not be
# used to endorse or promote products derived from this
# software without prior written permission from Digital
# Creations.
#
# 6. Redistributions of any form whatsoever must retain the
# following acknowledgment:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
#
##############################################################################
__doc__='''Principia Factories __doc__='''Principia Factories
$Id: Factory.py,v 1.3 1998/09/08 18:28:39 jim Exp $''' $Id: Factory.py,v 1.4 1998/12/04 20:15:25 jim Exp $'''
__version__='$Revision: 1.3 $'[11:-2] __version__='$Revision: 1.4 $'[11:-2]
import OFS.SimpleItem, Acquisition, Globals import OFS.SimpleItem, Acquisition, Globals
...@@ -67,17 +141,3 @@ class Factory(OFS.SimpleItem.Item, Acquisition.Implicit): ...@@ -67,17 +141,3 @@ class Factory(OFS.SimpleItem.Item, Acquisition.Implicit):
def index_html(self, REQUEST): def index_html(self, REQUEST):
" " " "
return getattr(self, self.initial)(self.aq_parent, REQUEST) return getattr(self, self.initial)(self.aq_parent, REQUEST)
##############################################################################
#
# $Log: Factory.py,v $
# Revision 1.3 1998/09/08 18:28:39 jim
# Added manage_edit.
#
# Revision 1.2 1998/08/14 16:48:52 brian
# Updated copy support in leverish things
#
# Revision 1.1 1998/08/03 13:43:27 jim
# new folderish control panel and product management
#
#
##############################################################################
#
# Zope Public License (ZPL) Version 0.9.4
# ---------------------------------------
#
# Copyright (c) Digital Creations. All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions in source code must retain the above
# copyright notice, this list of conditions, and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Any use, including use of the Zope software to operate a
# website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
#
# 4. All advertising materials, documentation, or technical papers
# mentioning features derived from or use of this software must
# display the following acknowledgement:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 5. Names associated with Zope or Digital Creations must not be
# used to endorse or promote products derived from this
# software without prior written permission from Digital
# Creations.
#
# 6. Redistributions of any form whatsoever must retain the
# following acknowledgment:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
#
##############################################################################
# Implement the manage_addProduct method of object managers # Implement the manage_addProduct method of object managers
......
##############################################################################
#
# Zope Public License (ZPL) Version 0.9.4
# ---------------------------------------
#
# Copyright (c) Digital Creations. All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions in source code must retain the above
# copyright notice, this list of conditions, and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Any use, including use of the Zope software to operate a
# website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
#
# 4. All advertising materials, documentation, or technical papers
# mentioning features derived from or use of this software must
# display the following acknowledgement:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 5. Names associated with Zope or Digital Creations must not be
# used to endorse or promote products derived from this
# software without prior written permission from Digital
# Creations.
#
# 6. Redistributions of any form whatsoever must retain the
# following acknowledgment:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
#
##############################################################################
"""Standard management interface support """Standard management interface support
$Id: Management.py,v 1.13 1998/12/03 21:02:27 jim Exp $""" $Id: Management.py,v 1.14 1998/12/04 20:15:25 jim Exp $"""
__version__='$Revision: 1.13 $'[11:-2] __version__='$Revision: 1.14 $'[11:-2]
import sys, Globals import sys, Globals
from Dialogs import MessageDialog from Dialogs import MessageDialog
......
##############################################################################
#
# Zope Public License (ZPL) Version 0.9.4
# ---------------------------------------
#
# Copyright (c) Digital Creations. All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions in source code must retain the above
# copyright notice, this list of conditions, and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Any use, including use of the Zope software to operate a
# website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
#
# 4. All advertising materials, documentation, or technical papers
# mentioning features derived from or use of this software must
# display the following acknowledgement:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 5. Names associated with Zope or Digital Creations must not be
# used to endorse or promote products derived from this
# software without prior written permission from Digital
# Creations.
#
# 6. Redistributions of any form whatsoever must retain the
# following acknowledgment:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
#
##############################################################################
"""Principia Product Objects """Principia Product Objects
""" """
# The new Product model: # The new Product model:
......
##############################################################################
#
# Zope Public License (ZPL) Version 0.9.4
# ---------------------------------------
#
# Copyright (c) Digital Creations. All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions in source code must retain the above
# copyright notice, this list of conditions, and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Any use, including use of the Zope software to operate a
# website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
#
# 4. All advertising materials, documentation, or technical papers
# mentioning features derived from or use of this software must
# display the following acknowledgement:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 5. Names associated with Zope or Digital Creations must not be
# used to endorse or promote products derived from this
# software without prior written permission from Digital
# Creations.
#
# 6. Redistributions of any form whatsoever must retain the
# following acknowledgment:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
#
##############################################################################
# Product registry and new product factory model. There will be a new # Product registry and new product factory model. There will be a new
# mechanism for defining actions for meta types. If an action is of # mechanism for defining actions for meta types. If an action is of
......
This diff is collapsed.
##############################################################################
#
# Zope Public License (ZPL) Version 0.9.4
# ---------------------------------------
#
# Copyright (c) Digital Creations. All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions in source code must retain the above
# copyright notice, this list of conditions, and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Any use, including use of the Zope software to operate a
# website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
#
# 4. All advertising materials, documentation, or technical papers
# mentioning features derived from or use of this software must
# display the following acknowledgement:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 5. Names associated with Zope or Digital Creations must not be
# used to endorse or promote products derived from this
# software without prior written permission from Digital
# Creations.
#
# 6. Redistributions of any form whatsoever must retain the
# following acknowledgment:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
#
##############################################################################
#!/bin/env python ##############################################################################
##############################################################################
# #
# Copyright # Zope Public License (ZPL) Version 0.9.4
# # ---------------------------------------
# Copyright 1996 Digital Creations, L.C., 910 Princess Anne #
# Street, Suite 300, Fredericksburg, Virginia 22401 U.S.A. All # Copyright (c) Digital Creations. All rights reserved.
# rights reserved. #
# # Redistribution and use in source and binary forms, with or
############################################################################## # without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions in source code must retain the above
# copyright notice, this list of conditions, and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Any use, including use of the Zope software to operate a
# website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
#
# 4. All advertising materials, documentation, or technical papers
# mentioning features derived from or use of this software must
# display the following acknowledgement:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 5. Names associated with Zope or Digital Creations must not be
# used to endorse or promote products derived from this
# software without prior written permission from Digital
# Creations.
#
# 6. Redistributions of any form whatsoever must retain the
# following acknowledgment:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
#
##############################################################################
__doc__='''Simple module for writing tar files __doc__='''Simple module for writing tar files
$Id: tar.py,v 1.1 1998/08/03 13:43:28 jim Exp $''' $Id: tar.py,v 1.2 1998/12/04 20:15:25 jim Exp $'''
__version__='$Revision: 1.1 $'[11:-2] __version__='$Revision: 1.2 $'[11:-2]
import sys, time, zlib import sys, time, zlib
try: try:
...@@ -38,42 +112,42 @@ def pad(s,l): ...@@ -38,42 +112,42 @@ def pad(s,l):
class TarEntry: class TarEntry:
def __init__(self, path, data, def __init__(self, path, data,
mode=0644, uid=0, gid=0, mtime=None, typeflag='0', mode=0644, uid=0, gid=0, mtime=None, typeflag='0',
linkname='', uname='jim', gname='system', prefix=''): linkname='', uname='jim', gname='system', prefix=''):
"Initialize a Tar archive entry" "Initialize a Tar archive entry"
self.data=data self.data=data
if mtime is None: mtime=int(time.time()) if mtime is None: mtime=int(time.time())
header=join([ header=join([
pad(path, 100), pad(path, 100),
oct8(mode), oct8(mode),
oct8(uid), oct8(uid),
oct8(gid), oct8(gid),
oct12(len(data)), oct12(len(data)),
oct12(mtime), oct12(mtime),
' ' * 8, ' ' * 8,
typeflag, typeflag,
pad(linkname, 100), pad(linkname, 100),
'ustar\0', 'ustar\0',
'00', '00',
pad(uname, 32), pad(uname, 32),
pad(gname, 32), pad(gname, 32),
'000000 \0', '000000 \0',
'000000 \0', '000000 \0',
pad(prefix, 155), pad(prefix, 155),
'\0'*12, '\0'*12,
], '') ], '')
if len(header) != 512: raise 'Bad Header Length', len(header) if len(header) != 512: raise 'Bad Header Length', len(header)
header=(header[:148]+ header=(header[:148]+
oct8(reduce(lambda a,b: a+b, map(ord,header)))+ oct8(reduce(lambda a,b: a+b, map(ord,header)))+
header[156:]) header[156:])
self.header=header self.header=header
def __str__(self): def __str__(self):
data=self.data data=self.data
l=len(data) l=len(data)
if l%512: data=data+'\0'*(512-l%512) if l%512: data=data+'\0'*(512-l%512)
return self.header+data return self.header+data
def tar(entries): def tar(entries):
r=[] r=[]
ra=r.append ra=r.append
...@@ -134,12 +208,3 @@ class gzFile: ...@@ -134,12 +208,3 @@ class gzFile:
append(pack("<i", self._crc)) append(pack("<i", self._crc))
append(pack("<i", self._l)) append(pack("<i", self._l))
return join(r,'') return join(r,'')
##############################################################################
#
# $Log: tar.py,v $
# Revision 1.1 1998/08/03 13:43:28 jim
# new folderish control panel and product management
#
#
This diff is collapsed.
"""Build timezone info into a compiled .pyc file"""
import os,struct
f_zones=['Brazil/Acre','Brazil/DeNoronha','Brazil/East','Brazil/West',
'Canada/Atlantic','Canada/Central','Canada/Eastern',
'Canada/East-Saskatchewan','Canada/Mountain','Canada/Newfoundland',
'Canada/Pacific','Canada/Yukon',
'Chile/Continental','Chile/EasterIsland',
'Cuba','Egypt','GB-Eire',
'GMT','GMT+1','GMT+2','GMT+3','GMT+4','GMT+5','GMT+6','GMT+7',
'GMT+8','GMT+9','GMT+10','GMT+11','GMT+12','GMT+13','GMT-1',
'GMT-2','GMT-3','GMT-4','GMT-5','GMT-6','GMT-7','GMT-8','GMT-9',
'GMT-10','GMT-11','GMT-12','Greenwich','Hongkong','Iceland','Iran',
'Israel','Jamaica','Japan',
'Mexico/BajaNorte','Mexico/BajaSur','Mexico/General',
'Poland','Singapore','Turkey','Universal',
'US/Alaska','US/Aleutian','US/Arizona','US/Central','US/Eastern',
'US/East-Indiana','US/Hawaii','US/Indiana-Starke','US/Michigan',
'US/Mountain','US/Pacific','US/Samoa']
class UnpackerLite:
# Tastes great, less filling ;)
def __init__(self,data): self.reset(data)
def reset(self,data): self.__buf,self.__pos=data,0
if (struct.pack('l',1)=='\0\0\0\1'):
def unpack_int(self):
i = self.__pos
self.__pos = j = i+4
data = self.__buf[i:j]
d=struct.unpack('l',self.__buf[i:j])[0]
if d >= 0x80000000L: return int(d-0x100000000L)
return int(d)
else:
def unpack_int(self):
i = self.__pos
self.__pos = j = i+4
d=self.__buf[i:j]
x=long(ord(d[0]))<<24 | ord(d[1])<<16 | ord(d[2])<<8 | ord(d[3])
if x >= 0x80000000L: return int(x-0x100000000L)
return int(x)
db_name='DateTimeZone'
zonedir='zones/'
def main():
print 'Building timezone data...'
zdata={}
try: db=open('%s.py' % db_name,'w')
except: raise 'IOError','Could not create %s.py' % db_name
for f in f_zones:
name,ttrans,tindex,ttinfo,az=f,[],'',[],''
_f=open('%s%s' % (zonedir,f),'rb')
data=_f.read()
_f.close()
up=UnpackerLite(data[32:44])
tzh_timecnt,tzh_typecnt,tzh_charcnt= \
up.unpack_int(),up.unpack_int(),up.unpack_int()
up.reset(data[44:44+4*tzh_timecnt])
p=44+4*tzh_timecnt
for i in range(tzh_timecnt): ttrans.append(up.unpack_int())
tindex=data[p:p+tzh_timecnt]
p=p+tzh_timecnt
d=data[p:p+6*tzh_typecnt]
for i in range(tzh_typecnt):
up.reset(d[6*i:6*i+4])
ttinfo.append(up.unpack_int(),ord(d[6*i+4]),ord(d[6*i+5]))
p=p+6*tzh_typecnt
az=data[p:p+tzh_charcnt]
zdata[name]=(name,tzh_timecnt,tzh_typecnt,ttrans,tindex,ttinfo,az)
db.write('_data=%s' % str(zdata))
db.close()
print 'Creating %s.pyc...' % db_name
__import__(db_name)
print '%s.pyc created successfully.' % db_name
if __name__=='__main__': main()
This source diff could not be displayed because it is too large. You can view the blob instead.
##############################################################################
#
# Zope Public License (ZPL) Version 0.9.4
# ---------------------------------------
#
# Copyright (c) Digital Creations. All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions in source code must retain the above
# copyright notice, this list of conditions, and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Any use, including use of the Zope software to operate a
# website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
#
# 4. All advertising materials, documentation, or technical papers
# mentioning features derived from or use of this software must
# display the following acknowledgement:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 5. Names associated with Zope or Digital Creations must not be
# used to endorse or promote products derived from this
# software without prior written permission from Digital
# Creations.
#
# 6. Redistributions of any form whatsoever must retain the
# following acknowledgment:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
#
##############################################################################
from DateTime import DateTime from DateTime import DateTime
############################################################################## ##############################################################################
# #
# Copyright (c) 1996-1998, Digital Creations, Fredericksburg, VA, USA. # Zope Public License (ZPL) Version 0.9.4
# All rights reserved. # ---------------------------------------
# #
# Redistribution and use in source and binary forms, with or without # Copyright (c) Digital Creations. All rights reserved.
# modification, are permitted provided that the following conditions are
# met:
# #
# o Redistributions of source code must retain the above copyright # Redistribution and use in source and binary forms, with or
# notice, this list of conditions, and the disclaimer that follows. # without modification, are permitted provided that the following
# conditions are met:
# #
# o Redistributions in binary form must reproduce the above copyright # 1. Redistributions in source code must retain the above
# notice, this list of conditions, and the following disclaimer in # copyright notice, this list of conditions, and the following
# the documentation and/or other materials provided with the # disclaimer.
# distribution.
# #
# o All advertising materials mentioning features or use of this # 2. Redistributions in binary form must reproduce the above
# software must display the following acknowledgement: # copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
# #
# This product includes software developed by Digital Creations # 3. Any use, including use of the Zope software to operate a
# and its contributors. # website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
# #
# o Neither the name of Digital Creations nor the names of its # 4. All advertising materials, documentation, or technical papers
# contributors may be used to endorse or promote products derived # mentioning features derived from or use of this software must
# from this software without specific prior written permission. # display the following acknowledgement:
# #
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
# #
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS AND CONTRIBUTORS *AS IS* # 5. Names associated with Zope or Digital Creations must not be
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED # used to endorse or promote products derived from this
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A # software without prior written permission from Digital
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL # Creations.
# CREATIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, #
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # 6. Redistributions of any form whatsoever must retain the
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS # following acknowledgment:
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND #
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR # "This product includes software developed by Digital
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE # Creations for use in the Z Object Publishing Environment
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH # (http://www.zope.org/)."
# DAMAGE. #
# # 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
# #
# If you have questions regarding this software, contact:
#
# Digital Creations, L.C.
# 910 Princess Ann Street
# Fredericksburge, Virginia 22401
#
# info@digicool.com
#
# (540) 371-6909
#
############################################################################## ##############################################################################
"""HTML formated DocumentTemplates """HTML formated DocumentTemplates
$Id: DT_HTML.py,v 1.13 1998/09/14 22:03:31 jim Exp $""" $Id: DT_HTML.py,v 1.14 1998/12/04 20:15:27 jim Exp $"""
from DT_String import String, FileMixin from DT_String import String, FileMixin
import DT_String, regex import DT_String, regex
......
############################################################################## ##############################################################################
# #
# Copyright (c) 1996-1998, Digital Creations, Fredericksburg, VA, USA. # Zope Public License (ZPL) Version 0.9.4
# All rights reserved. # ---------------------------------------
# #
# Redistribution and use in source and binary forms, with or without # Copyright (c) Digital Creations. All rights reserved.
# modification, are permitted provided that the following conditions are #
# met: # Redistribution and use in source and binary forms, with or
# # without modification, are permitted provided that the following
# o Redistributions of source code must retain the above copyright # conditions are met:
# notice, this list of conditions, and the disclaimer that follows. #
# # 1. Redistributions in source code must retain the above
# o Redistributions in binary form must reproduce the above copyright # copyright notice, this list of conditions, and the following
# notice, this list of conditions, and the following disclaimer in # disclaimer.
# the documentation and/or other materials provided with the #
# distribution. # 2. Redistributions in binary form must reproduce the above
# # copyright notice, this list of conditions, and the following
# o All advertising materials mentioning features or use of this # disclaimer in the documentation and/or other materials
# software must display the following acknowledgement: # provided with the distribution.
# #
# This product includes software developed by Digital Creations # 3. Any use, including use of the Zope software to operate a
# and its contributors. # website, must either comply with the terms described below
# # under "Attribution" or alternatively secure a separate
# o Neither the name of Digital Creations nor the names of its # license from Digital Creations.
# contributors may be used to endorse or promote products derived #
# from this software without specific prior written permission. # 4. All advertising materials, documentation, or technical papers
# # mentioning features derived from or use of this software must
# # display the following acknowledgement:
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS AND CONTRIBUTORS *AS IS* #
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED # "This product includes software developed by Digital
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A # Creations for use in the Z Object Publishing Environment
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL # (http://www.zope.org/)."
# CREATIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, #
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # 5. Names associated with Zope or Digital Creations must not be
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS # used to endorse or promote products derived from this
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # software without prior written permission from Digital
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR # Creations.
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE #
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH # 6. Redistributions of any form whatsoever must retain the
# DAMAGE. # following acknowledgment:
# #
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
# #
# If you have questions regarding this software, contact:
#
# Digital Creations, L.C.
# 910 Princess Ann Street
# Fredericksburge, Virginia 22401
#
# info@digicool.com
#
# (540) 371-6909
#
############################################################################## ##############################################################################
__doc__='''Conditional insertion __doc__='''Conditional insertion
Conditional insertion is performed using 'if' and 'else' Conditional insertion is performed using 'if' and 'else'
...@@ -117,8 +147,8 @@ __doc__='''Conditional insertion ...@@ -117,8 +147,8 @@ __doc__='''Conditional insertion
variable is not reevaluated. variable is not reevaluated.
''' '''
__rcs_id__='$Id: DT_If.py,v 1.14 1998/09/14 22:03:31 jim Exp $' __rcs_id__='$Id: DT_If.py,v 1.15 1998/12/04 20:15:27 jim Exp $'
__version__='$Revision: 1.14 $'[11:-2] __version__='$Revision: 1.15 $'[11:-2]
from DT_Util import ParseError, parse_params, name_param, str from DT_Util import ParseError, parse_params, name_param, str
......
############################################################################## ##############################################################################
# #
# Copyright (c) 1996-1998, Digital Creations, Fredericksburg, VA, USA. # Zope Public License (ZPL) Version 0.9.4
# All rights reserved. # ---------------------------------------
# #
# Redistribution and use in source and binary forms, with or without # Copyright (c) Digital Creations. All rights reserved.
# modification, are permitted provided that the following conditions are
# met:
# #
# o Redistributions of source code must retain the above copyright # Redistribution and use in source and binary forms, with or
# notice, this list of conditions, and the disclaimer that follows. # without modification, are permitted provided that the following
# conditions are met:
# #
# o Redistributions in binary form must reproduce the above copyright # 1. Redistributions in source code must retain the above
# notice, this list of conditions, and the following disclaimer in # copyright notice, this list of conditions, and the following
# the documentation and/or other materials provided with the # disclaimer.
# distribution.
# #
# o All advertising materials mentioning features or use of this # 2. Redistributions in binary form must reproduce the above
# software must display the following acknowledgement: # copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
# #
# This product includes software developed by Digital Creations # 3. Any use, including use of the Zope software to operate a
# and its contributors. # website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
# #
# o Neither the name of Digital Creations nor the names of its # 4. All advertising materials, documentation, or technical papers
# contributors may be used to endorse or promote products derived # mentioning features derived from or use of this software must
# from this software without specific prior written permission. # display the following acknowledgement:
# #
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
# #
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS AND CONTRIBUTORS *AS IS* # 5. Names associated with Zope or Digital Creations must not be
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED # used to endorse or promote products derived from this
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A # software without prior written permission from Digital
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL # Creations.
# CREATIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, #
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # 6. Redistributions of any form whatsoever must retain the
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS # following acknowledgment:
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND #
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR # "This product includes software developed by Digital
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE # Creations for use in the Z Object Publishing Environment
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH # (http://www.zope.org/)."
# DAMAGE. #
# # 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
# #
# If you have questions regarding this software, contact:
#
# Digital Creations, L.C.
# 910 Princess Ann Street
# Fredericksburge, Virginia 22401
#
# info@digicool.com
#
# (540) 371-6909
#
############################################################################## ##############################################################################
'''Sequence insertion '''Sequence insertion
A sequence may be inserted using an 'in' command. The 'in' A sequence may be inserted using an 'in' command. The 'in'
...@@ -349,8 +379,8 @@ ...@@ -349,8 +379,8 @@
''' #' ''' #'
__rcs_id__='$Id: DT_In.py,v 1.31 1998/10/21 14:58:12 jim Exp $' __rcs_id__='$Id: DT_In.py,v 1.32 1998/12/04 20:15:27 jim Exp $'
__version__='$Revision: 1.31 $'[11:-2] __version__='$Revision: 1.32 $'[11:-2]
from DT_Util import ParseError, parse_params, name_param, str from DT_Util import ParseError, parse_params, name_param, str
from DT_Util import render_blocks, InstanceDict from DT_Util import render_blocks, InstanceDict
......
############################################################################## ##############################################################################
# #
# Copyright (c) 1996-1998, Digital Creations, Fredericksburg, VA, USA. # Zope Public License (ZPL) Version 0.9.4
# All rights reserved. # ---------------------------------------
# #
# Redistribution and use in source and binary forms, with or without # Copyright (c) Digital Creations. All rights reserved.
# modification, are permitted provided that the following conditions are
# met:
# #
# o Redistributions of source code must retain the above copyright # Redistribution and use in source and binary forms, with or
# notice, this list of conditions, and the disclaimer that follows. # without modification, are permitted provided that the following
# conditions are met:
# #
# o Redistributions in binary form must reproduce the above copyright # 1. Redistributions in source code must retain the above
# notice, this list of conditions, and the following disclaimer in # copyright notice, this list of conditions, and the following
# the documentation and/or other materials provided with the # disclaimer.
# distribution.
# #
# o All advertising materials mentioning features or use of this # 2. Redistributions in binary form must reproduce the above
# software must display the following acknowledgement: # copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
# #
# This product includes software developed by Digital Creations # 3. Any use, including use of the Zope software to operate a
# and its contributors. # website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
# #
# o Neither the name of Digital Creations nor the names of its # 4. All advertising materials, documentation, or technical papers
# contributors may be used to endorse or promote products derived # mentioning features derived from or use of this software must
# from this software without specific prior written permission. # display the following acknowledgement:
# #
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
# #
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS AND CONTRIBUTORS *AS IS* # 5. Names associated with Zope or Digital Creations must not be
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED # used to endorse or promote products derived from this
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A # software without prior written permission from Digital
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL # Creations.
# CREATIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, #
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # 6. Redistributions of any form whatsoever must retain the
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS # following acknowledgment:
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND #
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR # "This product includes software developed by Digital
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE # Creations for use in the Z Object Publishing Environment
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH # (http://www.zope.org/)."
# DAMAGE. #
# # 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
# #
# If you have questions regarding this software, contact:
#
# Digital Creations, L.C.
# 910 Princess Ann Street
# Fredericksburge, Virginia 22401
#
# info@digicool.com
#
# (540) 371-6909
#
############################################################################## ##############################################################################
__doc__='''Sequence variables support __doc__='''Sequence variables support
$Id: DT_InSV.py,v 1.8 1998/09/14 22:03:32 jim Exp $''' $Id: DT_InSV.py,v 1.9 1998/12/04 20:15:28 jim Exp $'''
__version__='$Revision: 1.8 $'[11:-2] __version__='$Revision: 1.9 $'[11:-2]
from string import lower, rfind from string import lower, rfind
from math import sqrt from math import sqrt
......
############################################################################## ##############################################################################
# #
# Copyright (c) 1996-1998, Digital Creations, Fredericksburg, VA, USA. # Zope Public License (ZPL) Version 0.9.4
# All rights reserved. # ---------------------------------------
# #
# Redistribution and use in source and binary forms, with or without # Copyright (c) Digital Creations. All rights reserved.
# modification, are permitted provided that the following conditions are #
# met: # Redistribution and use in source and binary forms, with or
# # without modification, are permitted provided that the following
# o Redistributions of source code must retain the above copyright # conditions are met:
# notice, this list of conditions, and the disclaimer that follows. #
# # 1. Redistributions in source code must retain the above
# o Redistributions in binary form must reproduce the above copyright # copyright notice, this list of conditions, and the following
# notice, this list of conditions, and the following disclaimer in # disclaimer.
# the documentation and/or other materials provided with the #
# distribution. # 2. Redistributions in binary form must reproduce the above
# # copyright notice, this list of conditions, and the following
# o All advertising materials mentioning features or use of this # disclaimer in the documentation and/or other materials
# software must display the following acknowledgement: # provided with the distribution.
# #
# This product includes software developed by Digital Creations # 3. Any use, including use of the Zope software to operate a
# and its contributors. # website, must either comply with the terms described below
# # under "Attribution" or alternatively secure a separate
# o Neither the name of Digital Creations nor the names of its # license from Digital Creations.
# contributors may be used to endorse or promote products derived #
# from this software without specific prior written permission. # 4. All advertising materials, documentation, or technical papers
# # mentioning features derived from or use of this software must
# # display the following acknowledgement:
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS AND CONTRIBUTORS *AS IS* #
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED # "This product includes software developed by Digital
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A # Creations for use in the Z Object Publishing Environment
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL # (http://www.zope.org/)."
# CREATIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, #
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # 5. Names associated with Zope or Digital Creations must not be
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS # used to endorse or promote products derived from this
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # software without prior written permission from Digital
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR # Creations.
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE #
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH # 6. Redistributions of any form whatsoever must retain the
# DAMAGE. # following acknowledgment:
# #
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
# #
# If you have questions regarding this software, contact:
#
# Digital Creations, L.C.
# 910 Princess Ann Street
# Fredericksburge, Virginia 22401
#
# info@digicool.com
#
# (540) 371-6909
#
############################################################################## ##############################################################################
'''Raising exceptions '''Raising exceptions
Errors can be raised from DTML using the 'raise' tag. Errors can be raised from DTML using the 'raise' tag.
...@@ -65,8 +95,8 @@ ...@@ -65,8 +95,8 @@
<!--#/if--> <!--#/if-->
''' '''
__rcs_id__='$Id: DT_Raise.py,v 1.9 1998/09/14 22:03:32 jim Exp $' __rcs_id__='$Id: DT_Raise.py,v 1.10 1998/12/04 20:15:28 jim Exp $'
__version__='$Revision: 1.9 $'[11:-2] __version__='$Revision: 1.10 $'[11:-2]
from DT_Util import parse_params, name_param, render_blocks, str from DT_Util import parse_params, name_param, render_blocks, str
......
############################################################################## ##############################################################################
# #
# Copyright (c) 1996-1998, Digital Creations, Fredericksburg, VA, USA. # Zope Public License (ZPL) Version 0.9.4
# All rights reserved. # ---------------------------------------
# #
# Redistribution and use in source and binary forms, with or without # Copyright (c) Digital Creations. All rights reserved.
# modification, are permitted provided that the following conditions are
# met:
# #
# o Redistributions of source code must retain the above copyright # Redistribution and use in source and binary forms, with or
# notice, this list of conditions, and the disclaimer that follows. # without modification, are permitted provided that the following
# conditions are met:
# #
# o Redistributions in binary form must reproduce the above copyright # 1. Redistributions in source code must retain the above
# notice, this list of conditions, and the following disclaimer in # copyright notice, this list of conditions, and the following
# the documentation and/or other materials provided with the # disclaimer.
# distribution.
# #
# o All advertising materials mentioning features or use of this # 2. Redistributions in binary form must reproduce the above
# software must display the following acknowledgement: # copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
# #
# This product includes software developed by Digital Creations # 3. Any use, including use of the Zope software to operate a
# and its contributors. # website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
# #
# o Neither the name of Digital Creations nor the names of its # 4. All advertising materials, documentation, or technical papers
# contributors may be used to endorse or promote products derived # mentioning features derived from or use of this software must
# from this software without specific prior written permission. # display the following acknowledgement:
# #
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
# #
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS AND CONTRIBUTORS *AS IS* # 5. Names associated with Zope or Digital Creations must not be
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED # used to endorse or promote products derived from this
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A # software without prior written permission from Digital
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL # Creations.
# CREATIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, #
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # 6. Redistributions of any form whatsoever must retain the
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS # following acknowledgment:
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND #
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR # "This product includes software developed by Digital
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE # Creations for use in the Z Object Publishing Environment
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH # (http://www.zope.org/)."
# DAMAGE. #
# # 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
# #
# If you have questions regarding this software, contact:
#
# Digital Creations, L.C.
# 910 Princess Ann Street
# Fredericksburge, Virginia 22401
#
# info@digicool.com
#
# (540) 371-6909
#
############################################################################## ##############################################################################
"$Id: DT_String.py,v 1.19 1998/09/14 22:03:32 jim Exp $" "$Id: DT_String.py,v 1.20 1998/12/04 20:15:28 jim Exp $"
from string import split, strip from string import split, strip
import regex, ts_regex import regex, ts_regex
......
############################################################################## ##############################################################################
# #
# Copyright (c) 1996-1998, Digital Creations, Fredericksburg, VA, USA. # Zope Public License (ZPL) Version 0.9.4
# All rights reserved. # ---------------------------------------
# #
# Redistribution and use in source and binary forms, with or without # Copyright (c) Digital Creations. All rights reserved.
# modification, are permitted provided that the following conditions are #
# met: # Redistribution and use in source and binary forms, with or
# # without modification, are permitted provided that the following
# o Redistributions of source code must retain the above copyright # conditions are met:
# notice, this list of conditions, and the disclaimer that follows. #
# # 1. Redistributions in source code must retain the above
# o Redistributions in binary form must reproduce the above copyright # copyright notice, this list of conditions, and the following
# notice, this list of conditions, and the following disclaimer in # disclaimer.
# the documentation and/or other materials provided with the #
# distribution. # 2. Redistributions in binary form must reproduce the above
# # copyright notice, this list of conditions, and the following
# o All advertising materials mentioning features or use of this # disclaimer in the documentation and/or other materials
# software must display the following acknowledgement: # provided with the distribution.
# #
# This product includes software developed by Digital Creations # 3. Any use, including use of the Zope software to operate a
# and its contributors. # website, must either comply with the terms described below
# # under "Attribution" or alternatively secure a separate
# o Neither the name of Digital Creations nor the names of its # license from Digital Creations.
# contributors may be used to endorse or promote products derived #
# from this software without specific prior written permission. # 4. All advertising materials, documentation, or technical papers
# # mentioning features derived from or use of this software must
# # display the following acknowledgement:
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS AND CONTRIBUTORS *AS IS* #
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED # "This product includes software developed by Digital
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A # Creations for use in the Z Object Publishing Environment
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL # (http://www.zope.org/)."
# CREATIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, #
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # 5. Names associated with Zope or Digital Creations must not be
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS # used to endorse or promote products derived from this
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # software without prior written permission from Digital
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR # Creations.
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE #
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH # 6. Redistributions of any form whatsoever must retain the
# DAMAGE. # following acknowledgment:
# #
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
# #
# If you have questions regarding this software, contact:
#
# Digital Creations, L.C.
# 910 Princess Ann Street
# Fredericksburge, Virginia 22401
#
# info@digicool.com
#
# (540) 371-6909
#
############################################################################## ##############################################################################
__doc__='''Machinery to support through-the-web editing __doc__='''Machinery to support through-the-web editing
$Id: DT_UI.py,v 1.7 1998/09/14 22:03:33 jim Exp $''' $Id: DT_UI.py,v 1.8 1998/12/04 20:15:28 jim Exp $'''
__version__='$Revision: 1.7 $'[11:-2] __version__='$Revision: 1.8 $'[11:-2]
from DT_HTML import HTML from DT_HTML import HTML
......
############################################################################## ##############################################################################
# #
# Copyright (c) 1996-1998, Digital Creations, Fredericksburg, VA, USA. # Zope Public License (ZPL) Version 0.9.4
# All rights reserved. # ---------------------------------------
# #
# Redistribution and use in source and binary forms, with or without # Copyright (c) Digital Creations. All rights reserved.
# modification, are permitted provided that the following conditions are
# met:
# #
# o Redistributions of source code must retain the above copyright # Redistribution and use in source and binary forms, with or
# notice, this list of conditions, and the disclaimer that follows. # without modification, are permitted provided that the following
# conditions are met:
# #
# o Redistributions in binary form must reproduce the above copyright # 1. Redistributions in source code must retain the above
# notice, this list of conditions, and the following disclaimer in # copyright notice, this list of conditions, and the following
# the documentation and/or other materials provided with the # disclaimer.
# distribution.
# #
# o All advertising materials mentioning features or use of this # 2. Redistributions in binary form must reproduce the above
# software must display the following acknowledgement: # copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
# #
# This product includes software developed by Digital Creations # 3. Any use, including use of the Zope software to operate a
# and its contributors. # website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
# #
# o Neither the name of Digital Creations nor the names of its # 4. All advertising materials, documentation, or technical papers
# contributors may be used to endorse or promote products derived # mentioning features derived from or use of this software must
# from this software without specific prior written permission. # display the following acknowledgement:
# #
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
# #
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS AND CONTRIBUTORS *AS IS* # 5. Names associated with Zope or Digital Creations must not be
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED # used to endorse or promote products derived from this
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A # software without prior written permission from Digital
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL # Creations.
# CREATIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, #
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # 6. Redistributions of any form whatsoever must retain the
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS # following acknowledgment:
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND #
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR # "This product includes software developed by Digital
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE # Creations for use in the Z Object Publishing Environment
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH # (http://www.zope.org/)."
# DAMAGE. #
# # 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
# #
# If you have questions regarding this software, contact:
#
# Digital Creations, L.C.
# 910 Princess Ann Street
# Fredericksburge, Virginia 22401
#
# info@digicool.com
#
# (540) 371-6909
#
############################################################################## ##############################################################################
'''$Id: DT_Util.py,v 1.48 1998/11/23 15:20:40 jim Exp $''' '''$Id: DT_Util.py,v 1.49 1998/12/04 20:15:28 jim Exp $'''
__version__='$Revision: 1.48 $'[11:-2] __version__='$Revision: 1.49 $'[11:-2]
import regex, string, math, os import regex, string, math, os
from string import strip, join, atoi, lower, split, find from string import strip, join, atoi, lower, split, find
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
##############################################################################
#
# Zope Public License (ZPL) Version 0.9.4
# ---------------------------------------
#
# Copyright (c) Digital Creations. All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions in source code must retain the above
# copyright notice, this list of conditions, and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Any use, including use of the Zope software to operate a
# website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
#
# 4. All advertising materials, documentation, or technical papers
# mentioning features derived from or use of this software must
# display the following acknowledgement:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 5. Names associated with Zope or Digital Creations must not be
# used to endorse or promote products derived from this
# software without prior written permission from Digital
# Creations.
#
# 6. Redistributions of any form whatsoever must retain the
# following acknowledgment:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
#
##############################################################################
"""Help system implementation""" """Help system implementation"""
__version__='$Revision: 1.4 $'[11:-2] __version__='$Revision: 1.5 $'[11:-2]
import sys, os, string, Globals, Acquisition import sys, os, string, Globals, Acquisition
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -11,3 +11,5 @@ Record ../Components/ExtensionClass/Record.c -I../Components/Ext ...@@ -11,3 +11,5 @@ Record ../Components/ExtensionClass/Record.c -I../Components/Ext
cStringIO ../Components/cPickle/cStringIO.c cStringIO ../Components/cPickle/cStringIO.c
cPickle ../Components/cPickle/cPickle.c cPickle ../Components/cPickle/cPickle.c
zlib ../Components/zlib/zlib.c -I../Components/zlib ../Components/zlib/adler32.c ../Components/zlib/compress.c ../Components/zlib/crc32.c ../Components/zlib/gzio.c ../Components/zlib/uncompr.c ../Components/zlib/deflate.c ../Components/zlib/trees.c ../Components/zlib/zutil.c ../Components/zlib/inflate.c ../Components/zlib/infblock.c ../Components/zlib/inftrees.c ../Components/zlib/infcodes.c ../Components/zlib/infutil.c ../Components/zlib/inffast.c
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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