Commit f90d18e7 authored by Martijn Pieters's avatar Martijn Pieters

Clean up indentation and trailing whitespace.

parent 023c1df8
......@@ -230,4 +230,3 @@ def main():
if __name__ == '__main__':
main()
......@@ -137,4 +137,3 @@ def main():
if __name__ == '__main__':
main()
......@@ -12,8 +12,8 @@
##############################################################################
"""Restricted Python Expressions
"""
__rcs_id__='$Id: Eval.py,v 1.4 2001/11/28 15:51:11 matt Exp $'
__version__='$Revision: 1.4 $'[11:-2]
__rcs_id__='$Id: Eval.py,v 1.5 2002/08/14 21:44:31 mj Exp $'
__version__='$Revision: 1.5 $'[11:-2]
from string import translate, strip
import string
......@@ -119,4 +119,3 @@ class RestrictionCapableEval:
def __call__(self, **kw):
return self.eval(kw)
......@@ -12,7 +12,7 @@
##############################################################################
from __future__ import nested_scopes
__version__='$Revision: 1.7 $'[11:-2]
__version__='$Revision: 1.8 $'[11:-2]
import new
......@@ -110,7 +110,3 @@ safe_builtins['setattr'] = guarded_setattr
def guarded_delattr(object, name):
delattr(full_write_guard(object), name)
safe_builtins['delattr'] = guarded_delattr
......@@ -11,7 +11,7 @@
#
##############################################################################
__version__='$Revision: 1.3 $'[11:-2]
__version__='$Revision: 1.4 $'[11:-2]
limited_builtins = {}
......@@ -44,4 +44,3 @@ def limited_tuple(seq):
raise TypeError, 'cannot convert string to tuple'
return tuple(seq)
limited_builtins['tuple'] = limited_tuple
......@@ -11,7 +11,7 @@
#
##############################################################################
__version__='$Revision: 1.5 $'[11:-2]
__version__='$Revision: 1.6 $'[11:-2]
from SelectCompiler import ast
......@@ -72,4 +72,3 @@ class MutatingWalker:
def walk(tree, visitor):
return MutatingWalker(visitor).dispatchNode(tree)
......@@ -11,7 +11,7 @@
#
##############################################################################
__version__='$Revision: 1.3 $'[11:-2]
__version__='$Revision: 1.4 $'[11:-2]
class PrintCollector:
'''Collect written text, and return it when called.'''
......
......@@ -14,7 +14,7 @@
Python standard library.
"""
__version__='$Revision: 1.2 $'[11:-2]
__version__='$Revision: 1.3 $'[11:-2]
from compiler import ast, parse, misc, syntax
......@@ -146,4 +146,3 @@ def compile_restricted(source, filename, mode):
"'eval' or 'single'")
gen.compile()
return gen.getCode()
......@@ -11,7 +11,7 @@
#
##############################################################################
__version__='$Revision: 1.2 $'[11:-2]
__version__='$Revision: 1.3 $'[11:-2]
import sys
from traceback import format_exception_only
......
......@@ -15,7 +15,7 @@ RestrictionMutator modifies a tree produced by
compiler.transformer.Transformer, restricting and enhancing the
code in various ways before sending it to pycodegen.
'''
__version__='$Revision: 1.9 $'[11:-2]
__version__='$Revision: 1.10 $'[11:-2]
from SelectCompiler import ast, parse, OP_ASSIGN, OP_DELETE, OP_APPLY
......@@ -271,4 +271,3 @@ class RestrictionMutator:
def visitAugAssign(self, node, walker):
node.node.in_aug_assign = 1
return walker.defaultVisitNode(node)
......@@ -12,8 +12,8 @@
##############################################################################
__doc__='''Read-only Mapping class based on MultiMapping
$Id: SafeMapping.py,v 1.2 2001/11/28 15:51:11 matt Exp $'''
__version__='$Revision: 1.2 $'[11:-2]
$Id: SafeMapping.py,v 1.3 2002/08/14 21:44:31 mj Exp $'''
__version__='$Revision: 1.3 $'[11:-2]
from MultiMapping import MultiMapping
......
......@@ -12,7 +12,7 @@
##############################################################################
'''
Compiler selector.
$Id: SelectCompiler.py,v 1.3 2001/12/22 16:39:05 Brian Exp $
$Id: SelectCompiler.py,v 1.4 2002/08/14 21:44:31 mj Exp $
'''
import sys
......@@ -40,5 +40,3 @@ else:
compile_restricted_function, \
compile_restricted_exec, \
compile_restricted_eval
......@@ -11,7 +11,7 @@
#
##############################################################################
__version__='$Revision: 1.6 $'[11:-2]
__version__='$Revision: 1.7 $'[11:-2]
import string, math, random, whrandom
import DocumentTemplate.sequence
......
......@@ -12,9 +12,8 @@
##############################################################################
'''
RestrictedPython package.
$Id: __init__.py,v 1.4 2001/12/21 19:34:47 shane Exp $
$Id: __init__.py,v 1.5 2002/08/14 21:44:31 mj Exp $
'''
from SelectCompiler import *
from PrintCollector import PrintCollector
......@@ -21,4 +21,3 @@ compile(filename)
from transformer import parse, parseFile
from visitor import walk
from pycodegen import compile
......@@ -76,4 +76,3 @@ if __name__ == "__main__":
walk(tree, v)
print v.found
print
......@@ -64,4 +64,3 @@ def mangle(name, klass):
klass = klass[:MANGLE_LEN-tlen]
return "_%s%s" % (klass, name)
......@@ -154,4 +154,3 @@ def nested_scopes_1():
def f2():
return a
return f1() + f2()
# These are all supposed to raise a SyntaxError when using
# compile_restricted() but not when using compile().
# Each function in this module is compiled using compile_restricted().
......
......@@ -243,4 +243,3 @@ class GlobbingLexicon(Lexicon):
result = string.replace(result, '?', '.')
return "%s$" % result
......@@ -12,7 +12,7 @@
##############################################################################
"""Simple column indices"""
__version__='$Revision: 1.29 $'[11:-2]
__version__='$Revision: 1.30 $'[11:-2]
from Persistence import Persistent
from BTrees.OOBTree import OOBTree
......@@ -244,20 +244,3 @@ class Index(Persistent):
else: return None
return r, (id,)
......@@ -200,7 +200,3 @@ stop_words=(
)
stop_word_dict={}
for word in stop_words: stop_word_dict[word]=None
......@@ -12,7 +12,7 @@
##############################################################################
"""Pluggable Index Base Class """
__version__='$Revision: 1.3 $'[11:-2]
__version__='$Revision: 1.4 $'[11:-2]
import Interface
......
......@@ -92,4 +92,3 @@ class ResultList:
return self.__class__(
result, union(self._words, x._words), self._index)
......@@ -130,7 +130,7 @@ Notes on a new text index design
space.
"""
__version__='$Revision: 1.30 $'[11:-2]
__version__='$Revision: 1.31 $'[11:-2]
#XXX I strongly suspect that this is broken, but I'm not going to fix it. :(
......
......@@ -13,7 +13,7 @@
"""Simple column indices"""
__version__='$Revision: 1.30 $'[11:-2]
__version__='$Revision: 1.31 $'[11:-2]
from Globals import Persistent
from Acquisition import Implicit
......@@ -387,4 +387,3 @@ class UnIndex(Persistent, Implicit):
v = IISet((v,))
items.append((k, v))
return items
......@@ -19,7 +19,7 @@ undo information so that objects can be unindexed when the old value
is no longer known.
"""
__version__ = '$Revision: 1.52 $'[11:-2]
__version__ = '$Revision: 1.53 $'[11:-2]
import string, re
......
......@@ -13,8 +13,8 @@
__doc__='''Collected utilities to support database indexing.
$Id: __init__.py,v 1.9 2001/11/28 15:51:11 matt Exp $'''
__version__='$Revision: 1.9 $'[11:-2]
$Id: __init__.py,v 1.10 2002/08/14 21:46:24 mj Exp $'''
__version__='$Revision: 1.10 $'[11:-2]
import warnings
warnings.warn("The usage of the SearchIndex package is deprecated since \
Zope 2.4.\n\
......@@ -23,4 +23,3 @@ and will go away in a future release.\n\
\n\
Please use instead the re-factored modules in Products/PluginIndexes.\n\
",DeprecationWarning)
......@@ -281,6 +281,3 @@ class Bindings:
exec bindcode
bound_data = bound_data[0]
return self._exec(bound_data, args, kw)
......@@ -54,4 +54,3 @@ class Script(SimpleItem, BindingsUI):
raise "Redirect", "%s?%s" % (REQUEST['URL1'], join(vv, '&'))
from Signature import _setFuncSignature
......@@ -16,7 +16,7 @@
This provides support for simulating function signatures
"""
__version__='$Revision: 1.5 $'[11:-2]
__version__='$Revision: 1.6 $'[11:-2]
class FuncCode:
......@@ -42,4 +42,3 @@ def _setFuncSignature(self, defaults=None, varnames=(), argcount=-1):
code = FuncCode(varnames, argcount)
if self.func_code != code:
self.func_code = code
......@@ -12,8 +12,8 @@
##############################################################################
__doc__='''Shared classes and functions
$Id: Aqueduct.py,v 1.55 2002/02/15 16:30:29 evan Exp $'''
__version__='$Revision: 1.55 $'[11:-2]
$Id: Aqueduct.py,v 1.56 2002/08/14 21:50:59 mj Exp $'''
__version__='$Revision: 1.56 $'[11:-2]
import Globals, os
from Globals import Persistent
......
......@@ -12,8 +12,8 @@
##############################################################################
__doc__='''Generic Database Connection Support
$Id: Connection.py,v 1.34 2001/11/28 15:51:13 matt Exp $'''
__version__='$Revision: 1.34 $'[11:-2]
$Id: Connection.py,v 1.35 2002/08/14 21:50:59 mj Exp $'''
__version__='$Revision: 1.35 $'[11:-2]
import Globals, OFS.SimpleItem, AccessControl.Role, Acquisition, sys
from DateTime import DateTime
......
......@@ -13,7 +13,7 @@
__doc__='''Generic Database adapter'''
__version__='$Revision: 1.104 $'[11:-2]
__version__='$Revision: 1.105 $'[11:-2]
import OFS.SimpleItem, Aqueduct, RDB, re
import DocumentTemplate, marshal, md5, base64, Acquisition, os
......@@ -547,4 +547,3 @@ class Traverse(ExtensionClass.Base):
r=self.__dict__['_r']
if hasattr(r, name): return getattr(r,name)
return getattr(self.__dict__['_da'], name)
......@@ -13,8 +13,8 @@
__doc__='''Class for reading RDB files
$Id: RDB.py,v 1.32 2001/11/28 15:51:13 matt Exp $'''
__version__='$Revision: 1.32 $'[11:-2]
$Id: RDB.py,v 1.33 2002/08/14 21:50:59 mj Exp $'''
__version__='$Revision: 1.33 $'[11:-2]
from string import split, strip, lower, upper, atof, atoi, atol, find, join,find
import DateTime,re
......
......@@ -12,8 +12,8 @@
##############################################################################
__doc__='''Search Interface Wizard
$Id: Search.py,v 1.19 2002/07/19 18:24:23 efge Exp $'''
__version__='$Revision: 1.19 $'[11:-2]
$Id: Search.py,v 1.20 2002/08/14 21:50:59 mj Exp $'''
__version__='$Revision: 1.20 $'[11:-2]
from Globals import DTMLFile
from Aqueduct import custom_default_report, custom_default_zpt_report, nicify, Args
......@@ -252,14 +252,3 @@ def default_input_zpt_form(arguments,action='query',
'</body></html>\n'
% (tabs, action)
)
......@@ -13,14 +13,14 @@
__doc__='''short description
$Id: dbi_db.py,v 1.9 2001/11/28 15:51:13 matt Exp $'''
$Id: dbi_db.py,v 1.10 2002/08/14 21:50:59 mj Exp $'''
# Copyright
#
# Copyright 1997 Digital Creations, Inc, 910 Princess Anne
# Street, Suite 300, Fredericksburg, Virginia 22401 U.S.A. All
# rights reserved.
#
__version__='$Revision: 1.9 $'[11:-2]
__version__='$Revision: 1.10 $'[11:-2]
import string, sys
from string import strip, split, find, join
......
......@@ -69,8 +69,8 @@
# rights reserved.
#
############################################################################
__rcs_id__='$Id: sqlgroup.py,v 1.8 2001/11/28 15:51:13 matt Exp $'
__version__='$Revision: 1.8 $'[11:-2]
__rcs_id__='$Id: sqlgroup.py,v 1.9 2002/08/14 21:50:59 mj Exp $'
__version__='$Revision: 1.9 $'[11:-2]
from DocumentTemplate.DT_Util import parse_params
str=__builtins__['str']
......
......@@ -55,7 +55,7 @@
'and' or 'or' tag, otherwise, no text is inserted.
'''
__rcs_id__='$Id: sqltest.py,v 1.17 2002/08/09 17:58:33 jshell Exp $'
__rcs_id__='$Id: sqltest.py,v 1.18 2002/08/14 21:50:59 mj Exp $'
############################################################################
# Copyright
......@@ -65,7 +65,7 @@ __rcs_id__='$Id: sqltest.py,v 1.17 2002/08/09 17:58:33 jshell Exp $'
# rights reserved.
#
############################################################################
__version__='$Revision: 1.17 $'[11:-2]
__version__='$Revision: 1.18 $'[11:-2]
import sys
from DocumentTemplate.DT_Util import ParseError, parse_params, name_param
......
......@@ -47,7 +47,7 @@
however, if x is ommitted or an empty string, then the value
inserted is 'null'.
'''
__rcs_id__='$Id: sqlvar.py,v 1.12 2001/11/28 15:51:13 matt Exp $'
__rcs_id__='$Id: sqlvar.py,v 1.13 2002/08/14 21:50:59 mj Exp $'
############################################################################
# Copyright
......@@ -57,7 +57,7 @@ __rcs_id__='$Id: sqlvar.py,v 1.12 2001/11/28 15:51:13 matt Exp $'
# rights reserved.
#
############################################################################
__version__='$Revision: 1.12 $'[11:-2]
__version__='$Revision: 1.13 $'[11:-2]
from DocumentTemplate.DT_Util import ParseError, parse_params, name_param
from string import find, split, join, atoi, atof
......
......@@ -10,5 +10,5 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
__doc__='''$Id: __init__.py,v 1.8 2001/11/28 15:51:13 matt Exp $'''
__version__='$Revision: 1.8 $'[11:-2]
__doc__='''$Id: __init__.py,v 1.9 2002/08/14 21:50:59 mj Exp $'''
__version__='$Revision: 1.9 $'[11:-2]
......@@ -10,4 +10,4 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
__version__='$Revision: 1.2 $'[11:-2]
__version__='$Revision: 1.3 $'[11:-2]
......@@ -787,4 +787,3 @@ def test3():
if __name__ == '__main__':
test()
......@@ -168,4 +168,3 @@ def test():
if __name__=='__main__': print test()
......@@ -10,5 +10,5 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
__doc__='''$Id: __init__.py,v 1.6 2001/11/28 15:51:12 matt Exp $'''
__version__='$Revision: 1.6 $'[11:-2]
__doc__='''$Id: __init__.py,v 1.7 2002/08/14 21:50:59 mj Exp $'''
__version__='$Revision: 1.7 $'[11:-2]
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