[Tutor] code colorizer

Kirby Urner urnerk@qwest.net
Mon, 25 Mar 2002 09:42:37 -0800


At 05:06 PM 3/25/2002 +0100, ingo wrote:
>On 2002/03/25 at 07:02 Kirby Urner wrote:
>
> >  >>> import povsdl2html
> >  >>> povs12html.convert('myfile.pov')
> >
> >something like that.  The current code doesn't make
> >this easy.
>
>Done,
>code is at the same place.
>
>Ingo

Excellent!

Seems to me that:

   return reduce(lambda x,y:x+y,s)

in ad_tag() is a bottleneck, which is better replaced with:

   return ''.join(s)

I've been testing .convert('group366.pov') in shell mode
and need to make the above substitution to have it work.

If you want to test the same file (nothing special to look
at, just long ~120K of mostly cylinders), I've put it at:

http://www.inetarena.com/~pdx4d/ocn/python/group366.pov

Kirby