Python2Html regex question
- From: "Gerard Flanagan" <grflanagan@xxxxxxxxxxx>
- Date: 30 Aug 2005 10:28:08 -0700
Hello
I've been using the Html Formatter at
http://www.manoli.net/csharpformat to format c# code (paste your code
into the box, click the button and get html/css). Is there anything
similar for Python code, does anyone know?
Either way, the (c#) source is available for the above formatter and it
looks like it would be straightforward to create a Python formatter by
extending a base class and providing the following three things:
1) a list of python keywords
2) a regex to match python comments
3) a regex to match python strings
Even my limited talents can handle the first, can anyone help me with
2) and 3)?
C# uses '@' where Python uses 'r' as a 'raw-input' prefix for regex's,
but I'm assuming the expressions themselves are the same in both
languages?
Thanks in advance.
.
- Follow-Ups:
- Re: Python2Html regex question
- From: Fredrik Lundh
- Re: Python2Html regex question
- From: Trent Mick
- Re: Python2Html regex question
- Prev by Date: Re: Writing Multithreaded Client-Server in Python.
- Next by Date: Re: Bug in string.find; was: Re: Proposed PEP: New style indexing, was Re: Bug in slice type
- Previous by thread: Embedding Matplotlib images into wxPython
- Next by thread: Re: Python2Html regex question
- Index(es):