[PD] replace character with or create a symbol ',' or ' '

CK chris at lo-res.org
Sun Jan 22 23:01:25 CET 2006


I read:
> Thanks for the tip, but it's not doable for me (at least not now) as I 
> don't know to write python code...

it's not that difficult, 

import re

s = re.sub("c",",",s)   # where "c" is the char to be
s = re.sub("c"," ",s)   # replaced and s ist the string

HTH

x

see also: http://www.python.org/doc/
http://docs.python.org/lib/module-re.html

-- 
chris at lo-res.org	Postmodernism is german romanticism with better
http://pilot.fm/	special effects. (Jeff Keuss / via ctheory.com)




More information about the Pd-list mailing list