How to Post Source Code in WordPress

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);
[/sourcecode]

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 thoughts on “How to Post Source Code in WordPress

  1. Pingback: links for 2008-02-07

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s