Skip to content

twentyfirst

Tag: Source code

Posted on 28 June 2011

Syntax highlighting on WordPress.com

In order to present readable and usable code here on WordPress.com without manually formatting it I searched the intertubes for an elegant solution – and found one here. [sourcecode language=”python” gutter=”false”] import math, string def readFile(file): """Reads a file from disk and returns its content as a string variable :param file: path to a file to be … Continue reading Syntax highlighting on WordPress.com

  • RSS - Posts
  • RSS - Comments

If not otherwise specified, all content is © Ralph Straumann.