I See Dead Code

… as sounding brass, or a tinkling cymbal.

I See Dead Code header image 2

WP-Syntax Test

Mai 5th, 2007 · 4 Comments

Well, this post is only here to be a public test of WP-Syntax, a syntax coloring plugin for WordPress.

1
2
3
4
5
6
7
8
9
10
from itertools import islice
 
def fib():
    x, y = 1, 1
    while True:
        yield x
        x, y = y, x + y
 
for num in islice(fib(), 20):
    print num

The colors are definitely an eyesore. I need to do something about that…

Tags: lang:en · programming · python

4 responses so far ↓

  • 1 schnasel // Mai 5, 2007 at 23:09

    So we can assume you will be posting code on this site soon? That’s even more horrible than code on power point slides.

  • 2 shlomme // Mai 5, 2007 at 23:35

    But it will be quite wonderful Python code!

  • 3 Ryan McGeary // Aug 25, 2007 at 17:44

    For whatever reason, the GeSHi library uses a totally different color pallet for python than other languages. Check out the styling guidelines if you want to perform some styling customizations. The latest version of WP-Syntax allows for a new geshi initialization hook.

  • 4 shlomme // Aug 30, 2007 at 22:14

    I’ve just installed the latest version, but there’s still the bug that the line numbers and lines are not in the same place when using the overview (http://shlomme.diotavelli.net/category/python/). Do you know how to fix that?

Leave a Comment