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

`This module holds the actual file writer class.
(c) Copyright by Jay Love, 2000 (mailto:jsliv@jslove.net)
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.
THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL,
INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE !
This software is based in part on work done by the Jakarta group.`

Modules

``

PSP.BraceConverter PSP.PSPUtils | os re | string sys | tempfile time

Classes

``

ServletWriter

class ServletWriter
`` | `This file creates the servlet source code. Well, it writes it out to a file at least.`

Methods defined here:

__init__(self, ctxt)

close(self)

indent(self, st)
  `Indent the string.`

popIndent(self)

printChars(self, st)
  `Just prints what its given.`

printComment(self, start, stop, chars)

printIndent(self)
  `Just prints tabs.`

printList(self, strlist)
  `Prints a list of strings with indentation and a newline.`

printMultiLn(self, st)

println(self, line=None)
  `Print with indentation and a newline if none supplied.`

pushIndent(self)
  `this is very key, have to think more about it`

quoteString(self, s)
  `Escape the string.`

setIndentSpaces(self, amt)

setIndentType(self, type)

setIndention(self)

Data and other attributes defined here:

EMPTY_STRING = ''

SPACES = ' '

TAB = '\t'

Data
`` |  | AwakeCreated = 0 ResponseObject = 'res'