RE: [Zope] Using the replace function in a Zope Python Script
16 Aug
2001
16 Aug
'01
4:21 p.m.
Have you tried: import string
return string.replace("flubbery", "flub", "shrub")
Alternatively you can use the under namespace: return _.string.replace("flubbery", "flub", "shrub") although you'll first need to go to the python script object's "Bindings" tab and bind _ as the namespace (which is the recommended value anyway). I'm not sure if/why this is better than the way mentioned above, mind. :-) -Andy -- Andy Gimblett - Programmer - Frontier Internet Services Limited Tel: 029 20 820 044 Fax: 029 20 820 035 http://www.frontier.net.uk/ Statements made are at all times subject to Frontier's Terms and Conditions of Business, which are available upon request.
9000
Age (days ago)
9000
Last active (days ago)
0 comments
1 participants
participants (1)
-
Andy Gimblett