Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

Wednesday, 16 December 2009

Organizing and re-using Python code

As the code grows it has become necessary to structure it better and re-use it (import it) - so that it can be maintained and expanded effectively. In short, it is time to take a closer look at
if __name__=="__main__": ...

I think this is the best explanation... Better start implementing it.

Sunday, 6 December 2009

ASCII, ... Unicode and UTF-8

I was playing with Google Translate (and its API) for my sandbox project - which obviously means I deal with characters not fitting into ASCII.

After just sorting it out by trial and error for some time, and found this presentation:

http://farmdev.com/talks/unicode/

Absolutely brilliant! Why is that not on Python's own website?
Many thanks to the author Kumar McMillan.

PS. There are more useful learning on farmdev.