Tag Cloud

The next task is to create Tag Cloud for this blog, this is a good reference: Tag Cloud With Python

It turns out the the https://github.com/atizo/PyTagCloud is using a library called pygame which is not available in AppEngine, and http://code.google.com/p/feed-tagcloud-appengine/ is tied to Google's bog platform. Need to search for new solutions.

Python function syntax

Most of python syntax is pretty simple and straight forward, but I sometime confused with the function definition one. Here is a reminder to my self:

  • kind: regular input parameter
  • *arguments: all the other input parameter except keyword arguments
  • **keywrods: the keyword argument, which must be at the last. Keyword argument is in the form of key='value'


def cheeseshop(kind, *arguments, **keywords):
    print "-- Do you have any", kind, "?"
    print "-- I'm sorry, we're all out of", kind
    for arg in arguments:
        print arg
    print "-" * 40
    keys = sorted(keywords.keys())
    for kw in keys:
        print kw, ":", keywords[kw]
cheeseshop("Limburger", "It's very runny, sir.",
           "It's really very, VERY runny, sir.",
           shopkeeper='Michael Palin',
           client="John Cleese",
           sketch="Cheese Shop Sketch")


-- Do you have any Limburger ?
-- I'm sorry, we're all out of Limburger
It's very runny, sir.
It's really very, VERY runny, sir.
client : John Cleese
shopkeeper : Michael Palin
sketch : Cheese Shop Sketch

Why Python?

I have been asking myself the question, "why learn python"? It seems I enjoyed using it, otherwise I won't try the Appengine with Python. I want to know what other experts are saying, then I find this post:


I must agree that I have the similar feeling. I just can not put to words like that.


All Button Pressed