[Zope-Checkins] CVS: Zope2 - PythonScript.py:1.26
evan@serenade.digicool.com
evan@serenade.digicool.com
Wed, 11 Apr 2001 11:36:15 -0400
Update of /cvs-repository/Zope2/lib/python/Products/PythonScripts
In directory serenade.digicool.com:/home/evan/Zope/Zope2/lib/python/Products/PythonScripts
Modified Files:
PythonScript.py
Log Message:
merge to evan-script_fix-merge-3
--- Updated File PythonScript.py in package Zope2 --
--- PythonScript.py 2001/04/03 19:04:22 1.25
+++ PythonScript.py 2001/04/11 15:35:44 1.26
@@ -92,7 +92,7 @@
__version__='$Revision$'[11:-2]
import sys, os, traceback, re
-from Globals import DTMLFile, MessageDialog
+from Globals import DTMLFile, MessageDialog, package_home
import AccessControl, OFS, Guarded
from OFS.SimpleItem import SimpleItem
from DateTime.DateTime import DateTime
@@ -111,6 +111,8 @@
del imp
manage_addPythonScriptForm = DTMLFile('www/pyScriptAdd', globals())
+_default_file = os.path.join(package_home(globals()),
+ 'www', 'default.py')
_marker = [] # Create a new marker object
@@ -161,7 +163,7 @@
def __init__(self, id):
self.id = id
self.ZBindings_edit(defaultBindings)
- self._makeFunction(1)
+ self._body = open(_default_file).read()
security = AccessControl.ClassSecurityInfo()