Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
8f12e4a1
Commit
8f12e4a1
authored
Feb 07, 2002
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace string module calls by string methods
parent
d0de6597
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
15 deletions
+15
-15
lib/python/DocumentTemplate/DT_Return.py
lib/python/DocumentTemplate/DT_Return.py
+2
-2
lib/python/DocumentTemplate/DT_Try.py
lib/python/DocumentTemplate/DT_Try.py
+2
-2
lib/python/DocumentTemplate/DT_Var.py
lib/python/DocumentTemplate/DT_Var.py
+3
-3
lib/python/DocumentTemplate/pDocumentTemplate.py
lib/python/DocumentTemplate/pDocumentTemplate.py
+3
-3
lib/python/DocumentTemplate/sequence/SortEx.py
lib/python/DocumentTemplate/sequence/SortEx.py
+5
-5
No files found.
lib/python/DocumentTemplate/DT_Return.py
View file @
8f12e4a1
...
...
@@ -10,10 +10,10 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
__version__
=
'$Revision: 1.
5
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
6
$'
[
11
:
-
2
]
from
DT_Util
import
parse_params
,
name_param
,
str
import
string
,
sys
import
sys
class
ReturnTag
:
name
=
'return'
...
...
lib/python/DocumentTemplate/DT_Try.py
View file @
8f12e4a1
...
...
@@ -11,8 +11,8 @@
#
##############################################################################
import
string
,
sys
,
traceback
from
StringIO
import
StringIO
import
sys
,
traceback
from
c
StringIO
import
StringIO
from
DT_Util
import
ParseError
,
parse_params
,
render_blocks
from
DT_Util
import
namespace
,
InstanceDict
from
DT_Return
import
DTReturn
...
...
lib/python/DocumentTemplate/DT_Var.py
View file @
8f12e4a1
...
...
@@ -145,11 +145,11 @@ Evaluating expressions without rendering results
'''
# '
__rcs_id__
=
'$Id: DT_Var.py,v 1.
49 2001/11/28 15:50:55 matt
Exp $'
__version__
=
'$Revision: 1.
49
$'
[
11
:
-
2
]
__rcs_id__
=
'$Id: DT_Var.py,v 1.
50 2002/02/07 17:47:42 andreasjung
Exp $'
__version__
=
'$Revision: 1.
50
$'
[
11
:
-
2
]
from
DT_Util
import
parse_params
,
name_param
,
str
import
re
,
string
,
sys
import
string
,
re
,
sys
from
urllib
import
quote
,
quote_plus
from
cgi
import
escape
from
html_quote
import
html_quote
# for import by other modules, dont remove!
...
...
lib/python/DocumentTemplate/pDocumentTemplate.py
View file @
8f12e4a1
...
...
@@ -13,10 +13,10 @@
__doc__
=
'''Python implementations of document template some features
$Id: pDocumentTemplate.py,v 1.3
3 2001/11/28 15:50:55 matt
Exp $'''
__version__
=
'$Revision: 1.3
3
$'
[
11
:
-
2
]
$Id: pDocumentTemplate.py,v 1.3
4 2002/02/07 17:47:42 andreasjung
Exp $'''
__version__
=
'$Revision: 1.3
4
$'
[
11
:
-
2
]
import
string
,
sys
,
types
import
sys
,
types
ClassTypes
=
[
types
.
ClassType
]
...
...
lib/python/DocumentTemplate/sequence/SortEx.py
View file @
8f12e4a1
...
...
@@ -14,10 +14,10 @@
Advanced sort support by Oleg Broytmann <phd@@phd.pp.ru> 23 Apr 2001
eg Sort(sequence, (("akey", "nocase"), ("anotherkey", "cmp", "desc")))
$Id: SortEx.py,v 1.
3 2001/11/28 15:50:55 matt
Exp $
$Id: SortEx.py,v 1.
4 2002/02/07 17:47:42 andreasjung
Exp $
"""
from
string
import
lower
TupleType
=
type
(())
...
...
@@ -132,14 +132,14 @@ basic_type={type(''): 1, type(0): 1, type(0.0): 1, type(()): 1, type([]): 1,
type
(
None
)
:
1
}.
has_key
def
nocase
(
str1
,
str2
):
return
cmp
(
lower
(
str1
),
lower
(
str2
))
return
cmp
(
str1
.
lower
(),
str2
.
lower
(
))
import
sys
if
sys
.
modules
.
has_key
(
"locale"
):
# only if locale is already imported
from
locale
import
strcoll
def
strcoll_nocase
(
str1
,
str2
):
return
strcoll
(
lower
(
str1
),
lower
(
str2
))
return
strcoll
(
str1
.
lower
(),
str2
.
lower
(
))
def
make_sortfunctions
(
sortfields
,
_
):
...
...
@@ -175,7 +175,7 @@ def make_sortfunctions(sortfields, _):
else
:
# no - look it up in the namespace
func
=
_
.
getitem
(
f_name
,
0
)
sort_order
=
lower
(
f
[
2
]
)
sort_order
=
f
[
2
].
lower
(
)
if
sort_order
==
"asc"
:
multiplier
=
+
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment