Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #63284 > unrolled thread
| Started by | leo kirotawa <kirotawa@gmail.com> |
|---|---|
| First post | 2014-01-06 12:42 -0200 |
| Last post | 2014-01-06 12:42 -0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: word replacing in a paragraph leo kirotawa <kirotawa@gmail.com> - 2014-01-06 12:42 -0200
| From | leo kirotawa <kirotawa@gmail.com> |
|---|---|
| Date | 2014-01-06 12:42 -0200 |
| Subject | Re: word replacing in a paragraph |
| Message-ID | <mailman.5019.1389019388.18130.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
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@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)
Back to top | Article view | comp.lang.python
csiph-web