[Matrix-SIG] small pyfort fix
Berthold Hoellmann
hoel@germanlloyd.org
Thu, 13 Jan 2000 15:57:43 +0100
Hello,
There are really C compiler that reject newlines in string constants
(which is correct IMHO). I changed the function "fixup" in
"generator.py" of Pyfort3 to overcome problems resulting from this when
Pyfort is generating doc strings:
def fixup (acomment):
"Fix the comment so it can be a C string literal."
out = string.replace (acomment, '"', r'\"')
out = string.join(string.split(out, "\n"), "\\n\\\n")
return out
Cheers
Berthold
(I accidentially send this to matrix-sig-admin@python.org before)
--
email: hoel@GermanLloyd.org
)
(
C[_] These opinions might be mine, but never those of my employer.