Mailing List Archive

Anyone know about lgrind?
Does anyone here know enough about how lgrind works to make it work
with Python? Has anyone done this?

Or... does anyone have some generic code for marking up Python? (I
remember Just's HTML-code... But I can't seem to find it. And besides
- it used the regex module <wink>)

--

Magnus Making no sound / Yet smouldering with passion
Lie The firefly is still sadder / Than the moaning insect
Hetland : Minamoto Shigeyuki
Anyone know about lgrind? [ In reply to ]
mlh@idt.ntnu.no (Magnus L. Hetland) writes:

> Does anyone here know enough about how lgrind works to make it work
> with Python? Has anyone done this?

Never heard of it. But the lgrindefs entry on the Beta web page
suggests that the format is common with vgrind, so try this:

# attempts to treat long strings as comments; doesn't work, but doesn't seem to hurt
Python|python|py:\
:pb=(^\d?class\d\p\d?\:)|(^\d?def\d\p\d?\():\
:tl:\
:cb=#:ce=$:\
:ab="""|''':ae="""|''':\
:sb=":se=\e":\
:lb=':le=\e':\
:kw=and assert break class continue def del elif else except exec\
finally for from global if import in is lambda not or pass print\
raise return try while:
Anyone know about lgrind? [ In reply to ]
mlh@idt.ntnu.no (Magnus L. Hetland) writes:

> Or... does anyone have some generic code for marking up Python?

enscript (available from ftp.gnu.org) can pretty-print Python. You
use a `-E python' option.

Michael

--
Michael Haggerty
mhagger@blizzard.harvard.edu