word replacing in a paragraph

leo kirotawa kirotawa at gmail.com
Mon Jan 6 09:42:44 EST 2014


Since it is for a template you can round the keyword to be replaced ,
something like $data$ and then just  string.replace('$data','1234')




On Mon, Jan 6, 2014 at 12:01 PM, Frank Cui <ycui at outlook.com> wrote:

> Hey guys,
>
> I'm trying to automate a process by initially creating a standard template
> and then replace some text fields with variable values.
>
> [for example, "DATE" in the paragraph will be replaced by the current date
> value. it doesn't have to be a literal word of "DATE", "DATE" in "TESTDATE"
> can also be replaced.]
>
> Is there some lightweight built-in or 3rd party  libraries which are good
> for such kind of work ?
>
> Thanks
> Frank
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
>


-- 
----------------------------------------------
Leônidas S. Barbosa (Kirotawa)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140106/c6a4a1b7/attachment.html>


More information about the Python-list mailing list