regsub.gsub eats backslashes

Darrell darrell at dorb.com
Wed Mar 29 21:40:19 EST 2000


Provide a small test case and use re instead.

--Darrell


"Richard van de Stadt"
> Hi,
>
> I had a little fight with Python over a bunch of backslashes.
>
> I am generating proceedings. I.e. I am generating LaTeX.
>
> I have a proceedings template, with some keywords, which I replace by
> the contents of files, using regsub.gsub, e.g.:
>
> p = template
> p = regsub.gsub ('_PROGRAMCOMMITTEE_', programcommittee, p)
>






More information about the Python-list mailing list