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
2133b2e8
Commit
2133b2e8
authored
Nov 04, 2003
by
Evan Simpson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collector #1074: Give Script execution context a __name__
parent
764ccda5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
doc/CHANGES.txt
doc/CHANGES.txt
+2
-0
lib/python/Products/PythonScripts/PythonScript.py
lib/python/Products/PythonScripts/PythonScript.py
+2
-1
No files found.
doc/CHANGES.txt
View file @
2133b2e8
...
@@ -33,6 +33,8 @@ Zope Changes
...
@@ -33,6 +33,8 @@ Zope Changes
(such as storages, databases, or logging handlers) to be used.
(such as storages, databases, or logging handlers) to be used.
Bugs fixed
Bugs fixed
- Collector #1074: Give Script execution context a __name__
- Collector #1095: Allow TAL paths starting with '/varname' as a
- Collector #1095: Allow TAL paths starting with '/varname' as a
preferred spelling for 'CONTEXTS/varname'.
preferred spelling for 'CONTEXTS/varname'.
...
...
lib/python/Products/PythonScripts/PythonScript.py
View file @
2133b2e8
...
@@ -17,7 +17,7 @@ This product provides support for Script objects containing restricted
...
@@ -17,7 +17,7 @@ This product provides support for Script objects containing restricted
Python code.
Python code.
"""
"""
__version__
=
'$Revision: 1.4
8
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.4
9
$'
[
11
:
-
2
]
import
sys
,
os
,
traceback
,
re
,
marshal
,
new
import
sys
,
os
,
traceback
,
re
,
marshal
,
new
from
Globals
import
DTMLFile
,
MessageDialog
,
package_home
from
Globals
import
DTMLFile
,
MessageDialog
,
package_home
...
@@ -253,6 +253,7 @@ class PythonScript(Script, Historical, Cacheable):
...
@@ -253,6 +253,7 @@ class PythonScript(Script, Historical, Cacheable):
def
_newfun
(
self
,
code
):
def
_newfun
(
self
,
code
):
g
=
{
'__debug__'
:
__debug__
,
g
=
{
'__debug__'
:
__debug__
,
'__name__'
:
self
.
id
,
'__builtins__'
:
safe_builtins
,
'__builtins__'
:
safe_builtins
,
'_getattr_'
:
guarded_getattr
,
'_getattr_'
:
guarded_getattr
,
'_getitem_'
:
guarded_getitem
,
'_getitem_'
:
guarded_getitem
,
...
...
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