[CMF-checkins] CVS: CMF - FSPythonScript.py:1.10
shane@digicool.com
shane@digicool.com
Fri, 1 Jun 2001 10:41:36 -0400 (EDT)
Update of /cvs-repository/CMF/CMFCore
In directory korak.digicool.com:/tmp/cvs-serv25562
Modified Files:
FSPythonScript.py
Log Message:
Removed dependency on Python 2.x.
--- Updated File FSPythonScript.py in package CMF --
--- FSPythonScript.py 2001/05/30 16:52:32 1.9
+++ FSPythonScript.py 2001/06/01 14:41:35 1.10
@@ -85,7 +85,7 @@
"""Customizable Python scripts that come from the filesystem."""
__version__='$Revision$'[11:-2]
-from string import split
+from string import strip, split
from os import path, stat
import new
@@ -191,10 +191,10 @@
def ZScriptHTML_tryParams(self):
"""Parameters to test the script with."""
param_names = []
- for name in self._params.split(','):
- name = name.strip()
+ for name in split(self._params, ','):
+ name = strip(name)
if name and name[0] != '*':
- param_names.append(name.split('=', 1)[0])
+ param_names.append(split(name, '=', 1)[0])
return param_names
def read(self):