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

Evert Rol evert.rol at gmail.com
Mon Jul 31 09:23:58 EDT 2006


>
> > 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 ?


 Seen the syntaxical meaning of these 'comments', isn't a doc-string started
with a special symbol better? Eg,
"""!
 Bifurcation diagram of a mapping
============================================================================

 We are interested in the long term behavior of a sequence created by a
 the iteration of map.

 The logistic map
-------------------
"""

With a small chance of mixing up proper doc-strings with these ones, when
one
uses pydoc or help().

Otherwise, #% seems ok (shell/Python comment + LaTeX comment). I don't think
there's any Python command (line) starting with '%', so these can easily be
distinghuised from real comments

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


pyliterate then, as Darren suggested. Unless I missed the 'litter' joke ;-)

  Evert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20060731/e14dbfba/attachment.html>


More information about the SciPy-User mailing list