PSP.PSPUtils | index /usr/local/share/webware/PSP/PSPUtils.py

`A bunch of utility functions for the PSP generator.
(c) Copyright by Jay Love, 2000 (mailto:jsliv@jslove.org)
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee or royalty is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation or portions thereof, including modifications,
that you make.
This software is based in part on work done by the Jakarta group.`

Classes

``

exceptions.Exception(exceptions.BaseException)
  PSPParserException

class PSPParserException(exceptions.Exception)
`` | `PSP parser error.`

Method resolution order:
  PSPParserException
  exceptions.Exception
  exceptions.BaseException
  __builtin__.object

Data descriptors defined here:

__weakref__
  `list of weak references to the object (if defined)`

Methods inherited from exceptions.Exception:

__init__(...)
  `x.__init__(...) initializes x; see help(type(x)) for signature`

Data and other attributes inherited from exceptions.Exception:

__new__ = <built-in method __new__ of type object>
  `T.__new__(S, ...) -> a new object with type S, a subtype of T`

Methods inherited from exceptions.BaseException:

__delattr__(...)
  `x.__delattr__('name') <==> del x.name`

__getattribute__(...)
  `x.__getattribute__('name') <==> x.name`

__getitem__(...)
  `x.__getitem__(y) <==> x[y]`

__getslice__(...)
  `x.__getslice__(i, j) <==> x[i:j]
  Use of negative indices is not supported.`

__reduce__(...)

__repr__(...)
  `x.__repr__() <==> repr(x)`

__setattr__(...)
  `x.__setattr__('name', value) <==> x.name = value`

__setstate__(...)

__str__(...)
  `x.__str__() <==> str(x)`

__unicode__(...)

Data descriptors inherited from exceptions.BaseException:

__dict__

args

message

Functions

``

checkAttributes(tagType, attrs, validAttrs)
  `Check for mandatory and optional atributes.`

getExpr(s)
  `Get the content of a PSP expression.`

isExpression(s)
  `Check whether this is a PSP expression.`

normalizeIndentation(pySource)
  `Take a code block that may be too indented, and move it all to the left.
  See PSPUtilsTest for examples.
  First written by Winston Wolff; improved version by Christoph Zwerschke.`

removeQuotes(s)

splitLines(text, keepends=False)
  `Split text into lines.`

startsNewBlock(line)
  `Determine whether a code line starts a new block.
  Added by Christoph Zwerschke.`