[SciPy-user] Making notes out of a python script

Gael Varoquaux gael.varoquaux at normalesup.org
Mon Jul 31 07:48:48 EDT 2006


On Mon, Jul 31, 2006 at 12:33:41PM +0200, Robert Cimrman wrote:
> BTW Doug's comment on emacs using '##' as region comment has just bitten
> me - your script tried to pdflatex the comment and there was a function
> name with '_'...

Yes, indeed, this is a problem. I am open for suggestions to replace this.
"#r " seem not to good an idea: one could have code like "r = 1" that
gets commented and ends up in a litterate comment. Does "#% " seem
unlikely enough ? Other ideas ?

By the way, I found a bug ! If you have a string like this for
instance:
foo = """
## This is not a litterate comment
"""
 The  line begining with "## " will be interpretated as a litterate
comment. I really shouldn't be doing the splitting of the input code
with home made function. Anybody knows how to use the python compiler to
do this ?

    I like the name pylitterate. What do others think about it ?

-- 
    Gaël



More information about the SciPy-User mailing list