summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fbbb0e7)
raw | patch | inline | side by side (parent: fbbb0e7)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sat, 16 Nov 2002 07:43:22 +0000 (07:43 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sat, 16 Nov 2002 07:43:22 +0000 (07:43 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1383 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/cgi/TAL/TALInterpreter.py | patch | blob | history |
index 0f422846828bcb114a103988898f46aff9adbf86..be6d11e6b85f6b67f8349cf4e2ddd451cf05c63e 100644 (file)
import getopt
from cgi import escape
-from string import join, lower, rfind
-try:
- from strop import lower, rfind
-except ImportError:
- pass
try:
from cStringIO import StringIO
self._stream_write("\n")
self.col = 0
- def stream_write(self, s,
- len=len, rfind=rfind):
+ def stream_write(self, s, len=len):
self._stream_write(s)
- i = rfind(s, '\n')
+ i = s.rfind('\n')
if i < 0:
self.col = self.col + len(s)
else:
# Clear 'entering' flag
macs[-1][2] = 0
# Convert or drop depth-one METAL attributes.
- i = rfind(name, ":") + 1
+ i = name.rfind(":") + 1
prefix, suffix = name[:i], name[i:]
if suffix == "define-macro":
# Convert define-macro as we enter depth one.
if action > 1:
return self.attrAction(item)
ok = 1
- if self.html and lower(name) in BOOLEAN_HTML_ATTRS:
+ if self.html and name.lower() in BOOLEAN_HTML_ATTRS:
evalue = self.engine.evaluateBoolean(item[3])
if evalue is self.Default:
if action == 1: # Cancelled insert
return
s = escape(text)
self._stream_write(s)
- i = rfind(s, '\n')
+ i = s.rfind('\n')
if i < 0:
self.col = self.col + len(s)
else: