SyntaxHighlighter looks pretty good.
import stackless
import traceback
def f():
while 1:
pass
stackless.tasklet(f)()
while stackless.runcount > 1:
# If any tasklet runs for too long, kill it.
t = stackless.run(100000)
if t is not None:
traceback.print_stack(t.frame)
t.kill()
I tried this on an unpublished project and ended up going for the server-side alternative because it barfed on large source texts.
ReplyDeleteThat is mentioned as one of its limitations, that it uses regular expressions and with larger amounts of source code the javascript will timeout. I'm fine with that.
ReplyDeletei like SyntaxHighlighter and i've also found another solution using the dojo toolkit - neonstalwart: alternative syntax highlightingl
ReplyDelete