Hai’s Blog

January 18, 2008

How to Post Source Code in WordPress

Filed under: Internet, Programming, Tips & Tricks — Hai @ 5:49 pm

If you are hosting your blog on wordpress.com and would like to post your source code, WordPress has a treat for you. Check out this Java code sniffet:

for (int i = 0; i < 10; i++)
    print("Line number %d\n", i);

If you are interested, check out this WordPress FAQ page. WordPress claims to support Python, but I have tried and the syntax-highlighting feature does not work.

Another alternative is to use the Code Colorizer which I have described in my previous post. The Code Colorizer supports a number of languages, but Python is not one of them. If you know a solution for Python, please post a comment here.


2 Comments »

  1. [...] How to Post Source Code in WordPress « Hai’s Blog Colorizing code listings in WP. (tags: wordpress) [...]

    Pingback by links for 2008-02-07 — February 7, 2008 @ 12:36 am

  2. Somehow i missed the point. Probably lost in translation :) Anyway … nice blog to visit.

    cheers, Mountie
    .

    Comment by Mountie — June 18, 2008 @ 4:12 pm


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.