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
150de8a5
Commit
150de8a5
authored
Sep 25, 2001
by
Amos Latteier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
progress on python expressions, but still not there
parent
e8f4e48f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
2 deletions
+63
-2
lib/python/Products/PageTemplates/help/tales-python.stx
lib/python/Products/PageTemplates/help/tales-python.stx
+63
-2
No files found.
lib/python/Products/PageTemplates/help/tales-python.stx
View file @
150de8a5
...
@@ -2,12 +2,73 @@ TALES Python expressions
...
@@ -2,12 +2,73 @@ TALES Python expressions
Syntax
Syntax
XXX
Python expression syntax::
XXX
Description
Description
XXX
Python expressions evaluate Python code in a security-restricted
environment. Python expressions offer the same facilities as those
available in Python-based Scripts and DTML variable expressions.
Security Restrictions
XXX
Built-in Functions
Python expressions have the same built-ins as Python-based
scripts with a few additions.
These standard Python built-ins are available: 'None', 'abs',
'apply', 'callable', 'chr', 'cmp', 'complex', 'delattr',
'divmod', 'filter', 'float', 'getattr', 'hash', 'hex', 'int',
'isinstance', 'issubclass', 'list', 'len', 'long', 'map', 'max',
'min', 'oct', 'ord', 'repr', 'round', 'setattr', 'str', 'tuple'.
The 'range' and 'pow' functions are available and work the same
way they do in standard Python; however, they are limited to
keep them from generating very large numbers and sequences. This
limitation helps protect against denial of service attacks.
In addition, these DTML utility functions are available:
'DateTime', 'test', 'namespace', 'render'. See XXX for more
information on these functions.
Finally, these functions are available in Python expressions,
but not in Python-based scripts:
'path(string)' -- Evaluate a TALES "path":tales-path.stx
expression.
'string(string)' -- Evaluate a TALES "string":tales-string.stx
expression.
'exists(string)' -- Evaluates a TALES "exists":tales-exists.stx
expression.
'nocall(string)' -- Evaluates a TALES "nocall":tales-nocall.stx
expression.
Python Modules
string -- XXX
random -- XXX
math -- XXX
Products.PythonScripts.standard -- XXX
ZPTUtils.* -- XXX
AccessControl.XXX -- XXX
Examples
Examples
XXX
See Also
XXX
XXX
\ No newline at end of file
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