RE: [Zope] Using the replace function in a Zope Python Script
16 Aug
2001
16 Aug
'01
4:34 p.m.
At 17:21 16-08-2001 +0100, you wrote:
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
Well the reason why I need this function is that I just discovered today that a username in Zope can contain spaces - and that's not a good idea when we create file names (in FS) from users login name ... Is spaces really allowed in usernames ? Regards, Gitte Wange
9000
Age (days ago)
9000
Last active (days ago)
0 comments
1 participants
participants (1)
-
Gitte Wange