Testing pygments

This is a test post to see experiment with the code hightlighting
output from pygments.org (as recommended by a couple of commenters on
my previous post). Pygments produces HTML with CSS-based styling, so I
have added a bunch of new styles to my blogger template. And I am
including as a sample the same Python code posted earlier with the
alternative syntax highlighting tool.

def main(self, *m3ufilenames):
    for line in fileinput.input(m3ufilenames):
        mp3filename = line.strip()
        if not mp3filename or mp3filename.startswith('#'):
    return 0

So, let me know what you think of the 2 methods, and which looks

PyMOTW: Python Module of the Week

I am starting a new series of posts today that I am calling “Python
Module of the Week” (PyMOTW)
. I have two goals for this:

  1. to work my way though the standard library and learn something about
    each module
  2. to get into the habit of posting to the blog more regularly

I will cheat a little, and start out with some modules that I already
know something about. Hopefully that will give me enough of a head-start
that I can keep up a fairly regular flow.

image0Subscribe to PyMOTW in your feed reader