Commit f90d18e7 authored by Martijn Pieters's avatar Martijn Pieters

Clean up indentation and trailing whitespace.

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